-
Notifications
You must be signed in to change notification settings - Fork 90
Remove dependency to Junit4 #775
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
Comments
I can do this if you wish |
Hi, Can I work on this? I'm a first time contributor. |
This may not be straightforward to achieve, since the junit4 comes from testcontainers, where it has been an issue for a long time (issue linked at the bottom): See the relevant issue in testcontainers project: testcontainers/testcontainers-java#970. There are some workarounds mentioned though, may be worth to try them out |
Hello everyone! @szymonsadowski3 thanks for pointing this out. It seems indeed harder than I thought. It seems not to be as straightforward as just excluding a transitive dependency. I plan to clean up the backlog soon and create/find new issues that are (hopefully) a good start. |
@fabapp2 Really sorry if I step out of line here, but since I had the setup on my local and researched the issue already I took the liberty of opening a PR for this: #777 The workaround provided in the issue that I linked seems to be working fine based on my local testing (additionally I had to adjust fail assertion of IntegrationTestBaseClass as well, since it was using junit4 fail assertion). If this is turns out to be indeed a working solution, a further improvement would be to ban the use of junit4 using enforcer plugin (idea from https://stackoverflow.com/questions/61629824/preventing-the-use-of-junit4-libraries-in-a-pro) which maybe our friends @Rayan1605 and @nikhilyedke1995 can take a look at :) |
You've been fast @szymonsadowski3 🏎️ fixed with #777 |
What needs to be done
Remove JUnit4 from classpath
Why it needs to be done
Some dependency pulls in JUnit 4.
We use JUnit 5 and having both in the classpath could lead to wrong annotations being used, e.g.
@Test
.Acceptance Criteria
a
mvn dependency:tree
should not contain anyjunit:junit:4.x
dependencyThe text was updated successfully, but these errors were encountered: