-
Notifications
You must be signed in to change notification settings - Fork 95
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
Remove hard-coded test finder from JUnitCore #953
Remove hard-coded test finder from JUnitCore #953
Conversation
039a05a
to
260b1e9
Compare
I wonder if you could craft a unit test for unit test finder :) |
I actually discovered this bug while doing that :-) I'm looking at |
@mkeller could you please take a look too? I noticed you coded this a couple of years back so you probably still remember some use cases and possible side effects? |
260b1e9
to
36680c6
Compare
8ba01a7
to
23b5b5c
Compare
@iloveeclipse I added some tests, they have been provided in #968 though since they need to exist regardless of this PR. |
189f4ea
to
a5eddb3
Compare
I renamed |
a5eddb3
to
7a3f14f
Compare
Many thanks for the added tests, but if I run them without the change on |
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnit5TestFinderJupiterTest.java
Outdated
Show resolved
Hide resolved
7a3f14f
to
b83c53d
Compare
Any hint here? |
I was looking into it when you wrote :-) The current tests only provide the I'll provide a regression test today |
b83c53d
to
6750a02
Compare
I provided a regression test: |
6750a02
to
4823400
Compare
Perfect, thanks. |
The class contains some tests that cover the current capabilities of JUnit5TestFinder and it was missing from the tests. This class does NOT resemble the other 2 existing classes: JUnit3TestFinder and JUnit4TestFinder
The test finder should be obtained by looking into the container and determining what kind of tests can be run there. Rename JUnit4TestFinderTest to JUnitTestFinderTest and make it a parameterized test that runs both in JUnit4 and JUnit5 mode and add a regression test to it ("testInnerClassWithNestedAnnotationIsFound") Fixes eclipse-jdt#952
4823400
to
d9d0159
Compare
@fedejeanne : many thanks, especially for tests. |
My pleasure, thanks for reviewing! |
What it does
Use the proper test finder according to what the container has. Before this PR, the JUnit4 finder was hardcoded and some tests were not being found.
Fixes #952
How to test
build.xml
file doesn't contain the Launch Configuration created in step 3.After applying this PR, the launch configuration is exported.
Here's a screenshot of the difference in the
build.xml
files created before this PR (left) and after this PR (right)Here are the generated files: build_files.zip
Author checklist