Conversation
Generate changelog in
|
1bcdf1a to
07a7d57
Compare
|
Running because we reset the |
|
We should make sure calling |
| try { | ||
| before(); | ||
| } catch (RuntimeException e) { | ||
| after(); | ||
| throw e; | ||
| } |
There was a problem hiding this comment.
I would avoid having behaviour like this in junit5 version only. Instead this should live in DockerComposeManager.before() so both junit4 and 5 have the same behaviour
There was a problem hiding this comment.
Actually, I've just seen the junit4 code has something similar but needs to be slightly different as it uses the Statement style - this could stay. A little worried about the rethrowing the exception meaning this piece of code is missing in the stacktrace (perhaps addSupressed could help here by appending on an extra exception, if we need to keep the existing exception for backcompat reasons).
|
@CRogers I can do the call-after-once fix you suggested but do you know why the current integration test isn't failing here? I guess it's not running my new DockerComposeExtensionIntegrationTestWithFailingCommand ? |
| public abstract class DockerComposeExtension extends DockerComposeManager | ||
| implements BeforeAllCallback, AfterAllCallback { | ||
|
|
||
| private boolean hasCalledAfterMethod; |
There was a problem hiding this comment.
I think this should live in DockerComposeManager, not DockerComposeExtension that way DockerComposeRule gets this behaviour too.
f1a80e3 to
3d98783
Compare
call
after()(exactly 1 time)