-
Notifications
You must be signed in to change notification settings - Fork 917
fixes Rerun failed test with maven and junit5 creates the wrong command line. #8545
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
Conversation
|
I had a look at this and I think this is the wrong location to fix this. Try these two runs:
The first run shows the problem you are observing, while the second does not. The difference between the two can be found in the JUnit Integration for maven: netbeans/java/maven.junit.ui/src/org/netbeans/modules/maven/junit/ui/MavenJUnitTestMethodNode.java Lines 72 to 82 in 1947efd
The critical section is line 73. For the first run returns
For the full run you get a Looking at the NB history (Link goes to a git clone of the original mercurial history): emilianbold/netbeans-releases@3364af5 this strange behavior was introduces to handle nested tests and that does not even work correctly. I get |
|
Thank you for your attention, and time and effort spent. Done 20225-06-10 13:56 |
|
However, this solution does not cut it. |
I have tried what you suggested, but that appears not to cut it. Will create a better example project. |
|
Here an improved example project. Run test project, then rerun failed tests. |
|
In the latets version I applied matthiasblaesing to a different file. |
|
@homberghp please don't mention issue numbers in titles or commit messages. To link a PR with an issue, all you have to do is to add: to the PR message. github doc This will link it properly, and won't spam additional links during branching etc. (also: the merge commit will already contain the PR ID - so this is already covered) |
|
will do. |
When a test is rerun, either after passing or failing sometimes netbeans creates a wrong command line for maven This PR closes apache#8533
matthiasblaesing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me and works in local tests. Thank you!
Minor nitpick for the future: Formatting should observe the existing format. In this case there are missing spaces in multiple places. See in this screenshot (JUnitOutputListenerProvider):
I will merge anyway as this is generally readable and I'd like to get this in now.
|
@homberghp a second comment: when you force push into a branch, please also add a comment. Github does not notify about force pushes and so I missed your update. |


This fix reformats the
testproperty passed to the MavenCommandLineExecutorby replacing occurrences of
f.q.c.n.TestClass#f.q.c.n.TestClass.testMethodwithf.q.c.n.TestClass#testMethod.Closes: #8533