junit4
junit4 copied to clipboard
fireTestRunFinished not called after throwing StoppedByUserException
In JUnitCore the fireTestRunFinished should be placed in finally block.
This call is placed after runner.run(notifier);.
The notifier method fireTestRunFinished() cannot be called after JUnit threw StoppedByUserException.
The begin and the end of test-set should be completed. If started, then it must be finished. The problem is that we are not able to call RunNotifier outside because this is private variable in JUnitCore class. I made a hook to a Runner and took the notifier instance from run method. This is of course bad workaround. It would be great idea to have public pleaseStop() method on JUnitCore class and move notifier fireTestRunFinished in finally block.
https://github.com/junit-team/junit/blob/master/src/main/java/org/junit/runner/JUnitCore.java#L138
Hi there, I'd like to contribute, just as soon as I figure out my environment issues(Plugin execution not covered by lifecycle configuration: com.google.code.maven-replacer-plugin:replacer:1.5.3:replace)
Is this a good place to start?
@DanielCatz This is a great place to start. The "up-for-grabs" label is used for non-contentious issues that should be moderately easy to resolve.
The hardest part of this one would be coming up with a good test.
Is there a policy against using mocks in general, or just against using Mockito?
If you change this, Maven has to be notified and we will run a test. Go ahead.
On Tue, Sep 19, 2017 at 8:18 PM, cttillman [email protected] wrote:
Is there a policy against using mocks in general, or just against using Mockito?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/junit-team/junit4/issues/1186#issuecomment-330625225, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_yR0RZGv_7hcgM4ctw3NFbTCQ_uaH3ks5skARggaJpZM4FjZeT .
-- Cheers Tibor
@cttillman not sure I understand the question. If you are asking about the tests for JUnit 4.x itself, no we do not use mocking frameworks.
@kcooney For instance, I noticed CorruptListener only exists in testing, and I guess I was calling that "mocking." Maybe I am using the wrong terminology here.
@cttillman Yes, the tests of JUnit 4.x use hand-rolled test doubles (fakes, stubs and mocks).
Hi, Can this be worked on? is it available?
@somayaj There's currently no plan for another JUnit 4.x version.
@marcphilipp sounds good. Are there any other opportunities to contribute?
Sure, over on the junit5 repo: https://github.com/junit-team/junit5/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aup-for-grabs
Thanks Marc
On Thu, Nov 26, 2020 at 10:56 AM Marc Philipp [email protected] wrote:
Sure, over on the junit5 repo: https://github.com/junit-team/junit5/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aup-for-grabs
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/junit-team/junit4/issues/1186#issuecomment-734404351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRAZGKL6DYFYGBJ7TQBYYDSR2CB7ANCNFSM4BMNS6JQ .