fixes Rerun failed test with maven and junit5 creates the wrong command line.#8545
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: 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): https://github.com/emilianbold/netbeans-releases/commit/3364af50e2d9714524b6873125dc5ab1f4c36b38 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.
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