Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit4VersionCheck fails on a version string "4.12.0.redhat-003" #2198

Closed
rsynek opened this issue Feb 25, 2020 · 2 comments
Closed

JUnit4VersionCheck fails on a version string "4.12.0.redhat-003" #2198

rsynek opened this issue Feb 25, 2020 · 2 comments

Comments

@rsynek
Copy link

rsynek commented Feb 25, 2020

junit-vintage-engine does not recognize junit4 built under a version "4.12.0.redhat-003" and fails fast in JUnit4VersionCheck [1].

Steps to reproduce

  1. In a maven project, include junit of version "4.12.0.redhat-003" on classpath together with junit-vintage-engine as test dependencies.
  2. mvn test -> as a result, no tests are run

Additional information: based on maven-surefire-plugin version, either no hint is given at all (surefire version 2.22.1) or a stacktrace (2.22.2 and above) is provided, clearly leading to [1].

Context

  • Used versions (Jupiter/Vintage/Platform):
    5.5.2
  • Build Tool/IDE:
    maven

Deliverables

Expected: parse the aforementioned version string, discover the junit4 engine on classpath and run tests.

[1] https://github.com/junit-team/junit5/blob/master/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java#L54

@sbrannen
Copy link
Member

Tentatively slated for 5.7 M1 for team discussion

@sbrannen
Copy link
Member

Team Decision: Make the version parsing in JUnit4VersionCheck more lenient.

@marcphilipp marcphilipp modified the milestones: 5.7 M1, 5.6.3 Oct 26, 2020
marcphilipp pushed a commit that referenced this issue Oct 26, 2020
Prior to this commit, JUnit4VersionCheck failed to parse custom JUnit 4
version IDs if they did not match the pattern #.# (e.g., 4.12, 4.13,
etc.).

This commit relaxes the regular expression used to parse version IDs in
order to support custom version ID formats such as `4.12.0`,
`4.12-patch_1`, etc.

Closes #2198
barchetta added a commit to barchetta/helidon that referenced this issue Jan 27, 2021
barchetta added a commit to helidon-io/helidon that referenced this issue Jan 27, 2021
* Update Jackson to 2.12.1
* Upgrade to latest Junit5 to get fix for junit-team/junit5#2198
* Manage junit4 version
spericas added a commit to helidon-io/helidon that referenced this issue Feb 11, 2021
* Upgrade Netty to 4.1.58 (#2678)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Added overall timeout to evictable cache (#2659)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Fix copyright year for commits broken by squashing. (#2687)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Concat array enhancement (#2508)

* Concat array enhancement

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>

* Update Jackson to 2.12.1 (#2690)

* Update Jackson to 2.12.1
* Upgrade to latest Junit5 to get fix for junit-team/junit5#2198
* Manage junit4 version

* PokemonService template fixed in SE Database Archetype. (#2701)

Signed-off-by: Tomas Kraus <Tomas.Kraus@oracle.com>

* Fixed different output in DbClient SE archetype (#2703)

Signed-off-by: Tomas Kraus <Tomas.Kraus@oracle.com>

* Fix TODO application: (#2708)

- WebSecurity needs to be passed config.get("security") to take the "security.web-server" configuration
 - Added outbound configuration for the google login
 - Upgraded cassandra driver to fix issues with old guava dependencies
 - Removed metrics to avoid issues with cassandra driver.

Fixes #2707

* Update k8s descriptors to avoid using deprecated APIs. (#2719)

* Separate execution of DataChunkReleaseTest in its own VM to prevent leak messages in other test's logs. (#2716)

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Changes in this commit: (#2727)

1. Upgrade to Jersey 2.33
2. Configuration via system properties for the Jersey Client API. Any response in an exception will be mapped to an empty one to prevent data leaks. See eclipse-ee4j/jersey#4641.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Properly release underlying buffer before passing it to WebSocket handler (#2715)

* Properly release underlying buffer before passing it to handler.

* Releases data chunks after passing them to Tyrus without any copying. Reports an error and closes connection if Tyrus is unable to handle the data. Finally, fixed a problem related to subscription requests.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Removed unused logger.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed checkstyle.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fix issue with null value in JSON. (#2723)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Upgrade grpc to v1.35.0 (#2713)

* Upgrade grpc to v1.35.0

* Update copyright

* Upgrades OCI SDK to version 1.31.0 (#2699)

* Updated OCI to 1.31.0

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>

* Fix null array values in HOCON/JSON config parser. (#2731)

Resolves #2720 (follow-up)

* Performance improvements to queue(s) management in Webserver (#2704)

* Initial patch.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed some type params and improved comments.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* More cleanup and make sure to fail publisher on an error condition.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Suppress warnings.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Call clearQueues on every new request for proper cleanup of keep-alive connections. Some copyright fixes.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed checkstyle issues.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Force logging of LEAK error even if finalize does not get called on a DataChunk.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Upgrade Weld (#2668)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Rest client async header propagation with usage of Helidon Context (#2735)

Rest client header propagation with usage of Helidon Context

Signed-off-by: David Kral <david.k.kral@oracle.com>

* Allow override of Jersey property via config (#2737)

* Allow the default value of property jersey.config.client.ignoreExceptionResponse to be overridden via config. New test.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed copyright year.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* New implementation of LazyValue (#2738)

* New implementation of LazyValue that lazily initializes a Semaphore instead of eagerly creating a ReentrantLock. Makes use of volatile guarantees and atomicity of VarHandle updates.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* New test for LazyValueImpl.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Reduced sleep time in test.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Update CHANGELOG for 2.2.1 release (#2743)

* 2.2.1 THIRD_PARTY_LICENSES update (#2746)

* Update THIRD_PARTY_LICENSES

* Support async invocations using optional synthetic SimplyTimed behavior (#2745)

* Add support for async invocations for optional inferred SimplyTimed behavior on JAX-RS endpoints

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>

* Do not attempt to access the request context in Fallback callback. If used together with Retry, it is possible for the fallback to be called in a fresh thread for which there is no current request scope. Instead just use the original value obtained in this class' constructor. Updated functional test (with some class renaming) to cover this use case. (#2748)

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fix for native image. (#2753)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Fixed checkstyle issues.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

Co-authored-by: Tomas Langer <tomas.langer@gmail.com>
Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Co-authored-by: Joe DiPol <joe.dipol@oracle.com>
Co-authored-by: Tomáš Kraus <tomas.kraus@oracle.com>
Co-authored-by: Romain Grecourt <romain.grecourt@oracle.com>
Co-authored-by: Jonathan Knight <jk@thegridman.com>
Co-authored-by: Laird Nelson <laird.nelson@oracle.com>
Co-authored-by: David Král <david.k.kral@oracle.com>
Co-authored-by: Tim Quinn <tim.quinn@oracle.com>
spericas added a commit to helidon-io/helidon that referenced this issue Nov 22, 2021
* Fault Tolerance 3.0 Support (#2680)

* Initial changes to implement new metrics layer. Moving from complex names to simpler names and tags.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* More metric updates.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Migration of most unit tests to new metrics.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Completed migration of metrics test.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* New exception to discern timeouts during retries.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Implementation of retry metrics.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Cleanup metrics between tests.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Several changes related to execution of FT 3.0 TCKs. Adjusted initial size of executors and fixed a few other problems.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Copyright and checkstyle updates.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed copyright year.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed typos and some cleanup.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Created exclude file as a workaround for a sportbugs' bug.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Updated copyright year.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* MicroProfile Opentracing 2.0 (#2676)

* Microprofile Opentracing uprgated to 2.0
* Unused dependences removed
* Obsolete excludes removed

* Sync up of microprofile-4.0 with master branch (#2757)

* Upgrade Netty to 4.1.58 (#2678)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Added overall timeout to evictable cache (#2659)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Fix copyright year for commits broken by squashing. (#2687)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Concat array enhancement (#2508)

* Concat array enhancement

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>

* Update Jackson to 2.12.1 (#2690)

* Update Jackson to 2.12.1
* Upgrade to latest Junit5 to get fix for junit-team/junit5#2198
* Manage junit4 version

* PokemonService template fixed in SE Database Archetype. (#2701)

Signed-off-by: Tomas Kraus <Tomas.Kraus@oracle.com>

* Fixed different output in DbClient SE archetype (#2703)

Signed-off-by: Tomas Kraus <Tomas.Kraus@oracle.com>

* Fix TODO application: (#2708)

- WebSecurity needs to be passed config.get("security") to take the "security.web-server" configuration
 - Added outbound configuration for the google login
 - Upgraded cassandra driver to fix issues with old guava dependencies
 - Removed metrics to avoid issues with cassandra driver.

Fixes #2707

* Update k8s descriptors to avoid using deprecated APIs. (#2719)

* Separate execution of DataChunkReleaseTest in its own VM to prevent leak messages in other test's logs. (#2716)

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Changes in this commit: (#2727)

1. Upgrade to Jersey 2.33
2. Configuration via system properties for the Jersey Client API. Any response in an exception will be mapped to an empty one to prevent data leaks. See eclipse-ee4j/jersey#4641.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Properly release underlying buffer before passing it to WebSocket handler (#2715)

* Properly release underlying buffer before passing it to handler.

* Releases data chunks after passing them to Tyrus without any copying. Reports an error and closes connection if Tyrus is unable to handle the data. Finally, fixed a problem related to subscription requests.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Removed unused logger.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed checkstyle.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fix issue with null value in JSON. (#2723)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Upgrade grpc to v1.35.0 (#2713)

* Upgrade grpc to v1.35.0

* Update copyright

* Upgrades OCI SDK to version 1.31.0 (#2699)

* Updated OCI to 1.31.0

Signed-off-by: Laird Nelson <laird.nelson@oracle.com>

* Fix null array values in HOCON/JSON config parser. (#2731)

Resolves #2720 (follow-up)

* Performance improvements to queue(s) management in Webserver (#2704)

* Initial patch.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed some type params and improved comments.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* More cleanup and make sure to fail publisher on an error condition.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Suppress warnings.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Call clearQueues on every new request for proper cleanup of keep-alive connections. Some copyright fixes.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed checkstyle issues.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Force logging of LEAK error even if finalize does not get called on a DataChunk.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Upgrade Weld (#2668)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Rest client async header propagation with usage of Helidon Context (#2735)

Rest client header propagation with usage of Helidon Context

Signed-off-by: David Kral <david.k.kral@oracle.com>

* Allow override of Jersey property via config (#2737)

* Allow the default value of property jersey.config.client.ignoreExceptionResponse to be overridden via config. New test.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed copyright year.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* New implementation of LazyValue (#2738)

* New implementation of LazyValue that lazily initializes a Semaphore instead of eagerly creating a ReentrantLock. Makes use of volatile guarantees and atomicity of VarHandle updates.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* New test for LazyValueImpl.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Reduced sleep time in test.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Update CHANGELOG for 2.2.1 release (#2743)

* 2.2.1 THIRD_PARTY_LICENSES update (#2746)

* Update THIRD_PARTY_LICENSES

* Support async invocations using optional synthetic SimplyTimed behavior (#2745)

* Add support for async invocations for optional inferred SimplyTimed behavior on JAX-RS endpoints

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>

* Do not attempt to access the request context in Fallback callback. If used together with Retry, it is possible for the fallback to be called in a fresh thread for which there is no current request scope. Instead just use the original value obtained in this class' constructor. Updated functional test (with some class renaming) to cover this use case. (#2748)

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fix for native image. (#2753)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>

* Fixed checkstyle issues.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

Co-authored-by: Tomas Langer <tomas.langer@gmail.com>
Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Co-authored-by: Joe DiPol <joe.dipol@oracle.com>
Co-authored-by: Tomáš Kraus <tomas.kraus@oracle.com>
Co-authored-by: Romain Grecourt <romain.grecourt@oracle.com>
Co-authored-by: Jonathan Knight <jk@thegridman.com>
Co-authored-by: Laird Nelson <laird.nelson@oracle.com>
Co-authored-by: David Král <david.k.kral@oracle.com>
Co-authored-by: Tim Quinn <tim.quinn@oracle.com>

* Fixed problems in RetryImpl after merge.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed problems with metrics after merge.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Updated version in suite file.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed problem retrieving registry for metrics.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed more problems after merge. All tests are passing now.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed checkstyle errors.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Fixed TODO.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Enabled TCK's by default and removed generated file.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* One more checkstyle violation.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

* Removed duplicate test after merge.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>

Co-authored-by: Dmitry Aleksandrov <mitiaalexandrov@gmail.com>
Co-authored-by: Tomas Langer <tomas.langer@gmail.com>
Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Co-authored-by: Joe DiPol <joe.dipol@oracle.com>
Co-authored-by: Tomáš Kraus <tomas.kraus@oracle.com>
Co-authored-by: Romain Grecourt <romain.grecourt@oracle.com>
Co-authored-by: Jonathan Knight <jk@thegridman.com>
Co-authored-by: Laird Nelson <laird.nelson@oracle.com>
Co-authored-by: David Král <david.k.kral@oracle.com>
Co-authored-by: Tim Quinn <tim.quinn@oracle.com>
richard-timpson pushed a commit to richard-timpson/kork that referenced this issue May 3, 2023
Along with it upgrade org.junit:junit-bom to 5.6.3. due to this:
spring boot 2.2.13 uses groovy version 2.5.14, that upgrades org.codehaus.groovy:groovy-test from 2.5.11 (constrained in spinnaker-dependencies) to 2.5.14 and upgrades junit:junit from 4.13 to 4.13.1.
In kork, org.junit:junit-bom is constrained to 5.6.2, having bug as junit-vintage-engine:5.6.2 does not parse junit version of format x.y.z, just parse x.y.
This bug is fixed in 5.6.3 and 5.7.0.
junit-team/junit5#2529
junit-team/junit5#2198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants