You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by mureinik <gi...@git.apache.org> on 2018/10/06 10:11:25 UTC

[GitHub] commons-lang pull request #366: Update concurrent tests to JUnit Jupiter

GitHub user mureinik opened a pull request:

    https://github.com/apache/commons-lang/pull/366

    Update concurrent tests to JUnit Jupiter

    Upgrade the tests in the concurrent package to use JUnit Jupiter as part of the effort to remove the dependency on the Vintage Engine.
    
    While most of these changes are drop-in replacements with no functional benefit, there are some non-obvious changes worth mentioning.
    
    Unlike `org.junit.Test`, `org.junit.jupiter.api.Test` does not have an `expected` argument. Instead, an explicit call to `org.junit.jupiter.api.Assertions.assertThrows` is used. This call allows the test to pinpoint the exact statement that is expected to throw the exception and allows making the tests a bit stricter by preventing
    false-positives that could occur if the setup code would throw the expected exception instead of the statement that was supposed to throw it.
    
    Another notable change was performed in `MemoizerTest`.
    JUnit Jupiter does not support JUnit 4's runners, and EasyMock has no equivalent `@Extension`, so a setup method was added and the mock was explicitly initialized.
    
    It's also worth noting this is a minimal patch for migrating the package's tests to Jupiter. There are several tests that can be made more elegant with Jupiter's new features, but that work is left
    for subsequent patches.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mureinik/commons-lang junit-jupiter-concurrent

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/366.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #366
    
----
commit dd761382d3cfdc11b5de0cb1246de4567cdf2fc2
Author: Allon Mureinik <mu...@...>
Date:   2018-10-02T03:41:37Z

    Update concurrent tests to JUnit Jupiter
    
    Upgrade the tests in the concurrent package to use JUnit Jupiter as
    part of the effort to remove the dependency on the Vintage Engine.
    
    While most of these changes are drop-in replacements with no functional
    benefit, there are some non-obvious changes worth mentioning.
    
    Unlike org.junit.Test, org.junit.jupiter.api.Test does not have an
    "expected" argument. Instead, an explicit call to
    org.junit.jupiter.api.Assertions.assertThrows is used. This call allows
    the test to pinpoint the exact statement that is expected to throw the
    exception and allows making the tests a bit stricter by preventing
    false-positives that could occur if the setup code would throw the
    expected exception instead of the statement that was supposed to throw
    it.
    
    Another notable change was performed in MemoizerTest.
    JUnit Jupiter does not support JUnit 4's runners, and EasyMock has no
    equivalent @Extension, so a setup method was added and the mock was
    explicitly initialized.
    
    It's also worth noting this is a minimal patch for migrating the
    package's tests to Jupiter. There are several tests that can be made
    made more elegant with Jupiter's new features, but that work is left
    for subsequent patches.

----


---

[GitHub] commons-lang pull request #366: Update concurrent tests to JUnit Jupiter

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-lang/pull/366


---

[GitHub] commons-lang issue #366: Update concurrent tests to JUnit Jupiter

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/366
  
    
    [![Coverage Status](https://coveralls.io/builds/19384033/badge)](https://coveralls.io/builds/19384033)
    
    Coverage increased (+0.007%) to 95.253% when pulling **dd761382d3cfdc11b5de0cb1246de4567cdf2fc2 on mureinik:junit-jupiter-concurrent** into **6191dedf35e1afe784fac9b4845f699749037346 on apache:master**.



---

[GitHub] commons-lang issue #366: Update concurrent tests to JUnit Jupiter

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-lang/pull/366
  
    Thanks! 👍 


---