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

Switch JUnit to 5.10 #799

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Conversation

szpak
Copy link
Contributor

@szpak szpak commented Dec 20, 2023

I would be good to switch and release the new version to do not (transitively) generate:

ClassNotFoundException: org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction

in some corner cases.

For example. Using 5.10 in the project with Allure 2.25.0 can generate the following dependencies:

[INFO] +- io.qameta.allure:allure-junit5:jar:2.25.0:test
[INFO] |  +- io.qameta.allure:allure-junit-platform:jar:2.25.0:test
[INFO] |  |  \- io.qameta.allure:allure-test-filter:jar:2.25.0:test
[INFO] |  \- org.junit.platform:junit-platform-launcher:jar:1.9.2:test
[INFO] |     \- org.junit.platform:junit-platform-engine:jar:1.9.2:test
...
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.10.1:compile
[INFO] |  +- org.opentest4j:opentest4j:jar:1.3.0:compile
[INFO] |  +- org.junit.platform:junit-platform-commons:jar:1.10.1:compile
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.2:compile

It is possible to override them (e.g. by using JUnit BOM in the end project, which is good also for the other reasons), but Allure should provide consistent dependencies with:

mavenBom("org.junit:junit-bom:5.10.1")
...
dependency("org.junit-pioneer:junit-pioneer:2.2.0")

It could be probably "fixed" on the Allure side, but junit-pioneer providing 5.10/1.10 by default would be helpful anyway.


PR checklist

The following checklist shall help the PR's author, the reviewers and maintainers to ensure the quality of this project.
It is based on our contributors guidelines, especially the "writing code" section.
It shall help to check for completion of the listed points.
If a point does not apply to the given PR's changes, the corresponding entry can be simply marked as done.

Documentation (general)

  • There is documentation (Javadoc and site documentation; added or updated)
  • There is implementation information to describe why a non-obvious source code / solution got implemented
  • Site documentation has its own .adoc file in the docs folder, e.g. docs/report-entries.adoc
  • Site documentation in .adoc file references demo in src/demo/java instead of containing code blocks as text
  • Only one sentence per line (especially in .adoc files)
  • Javadoc uses formal style, while sites documentation may use informal style

Documentation (new extension)

  • The docs/docs-nav.yml navigation has an entry for the new extension
  • The package-info.java contains information about the new extension

Code (general)

  • Code adheres to code style, naming conventions etc.
  • Successful tests cover all changes
  • There are checks which validate correct / false usage / configuration of a functionality and there are tests to verify those checks
  • Tests use AssertJ or our own PioneerAssert (which are based on AssertJ)

Code (new package)

  • The new package is exported in module-info.java
  • The new package is also present in the tests
  • The new package is opened for reflection to JUnit 5 in module-info.java
  • The new package is listed in the contribution guide

Contributing

  • A prepared commit message exists
  • The list of contributions inside README.adoc mentions the new contribution (real name optional)

@Michael1993 Michael1993 merged commit b02cda6 into junit-pioneer:main Dec 20, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants