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

Convert test suite to Junit5 #288

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

WolfgangHG
Copy link
Contributor

This pull request converts the test suite to JUnit 5 and resolves #220

I fear it is not mergeable, I did something wrong when rebasing. I did a "git pull --rebase upstream main" and then "git push origin --force" (as you suggested some time ago), and after resolving some merge conflicts, github tells me "This branch is 11 commits ahead of, 13 commits behind arquillian/arquillian-extension-warp:main.". So If it s not mergeable, I will create a new pull request.

Main changes:

  1. org.jboss.arquillian.warp.impl.testutils.SeparatedClassloaderRunner does not work with JUnit 5, so I followed the suggestion from Separate ClassLoader per test junit-team/junit5#4203 and added a SeparatedClassloaderExtension and a LauncherSessionListener implementation. Due to conflicts with other tests tampering with the classloader, I extracted all @SeparatedClassPath tests to an extra module "impl_test_separatecl".
  2. The impl project tests use arquillian-core internal test base classes org.jboss.arquillian.test.test.AbstractTestTestBase, org.jboss.arquillian.core.test.AbstractManagerTestBase and org.jboss.arquillian.container.test.test.AbstractContainerTestTestBase, which support only JUnit4. We decided to copy them to this project as a (temporary) workaround - JUnit5 versions of AbstractManagerTestBase  arquillian-core#665. So this pull request supersedes Remove dependencies on arquillian-core testjars #286 #287
  3. The tests annotated with @RunWith(MockitoJUnitRunner.class) have to be converted to @ExtendWith(MockitoExtension.class), which seems to behave differently when checking stubbings in @BeforeEach methods (access to stubbed objects seems to be evaluated per test method, while it was before checked per test class), so I added several lenient() calls.

WolfgangHG and others added 15 commits December 15, 2024 11:06
Bumps [org.apache.logging.log4j:log4j-bom](https://github.com/apache/logging-log4j2) from 2.24.2 to 2.24.3.
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](apache/logging-log4j2@rel/2.24.2...rel/2.24.3)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.apache.httpcomponents.core5:httpcore5](https://github.com/apache/httpcomponents-core) from 5.3.1 to 5.3.2.
- [Changelog](https://github.com/apache/httpcomponents-core/blob/rel/v5.3.2/RELEASE_NOTES.txt)
- [Commits](apache/httpcomponents-core@rel/v5.3.1...rel/v5.3.2)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.core5:httpcore5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.14.2 to 5.15.2.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.14.2...v5.15.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps org.apache.tomee:arquillian-tomee-remote from 10.0.0-M3 to 10.0.0.

---
updated-dependencies:
- dependency-name: org.apache.tomee:arquillian-tomee-remote
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
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.

Migrate tests to JUnit 5
2 participants