You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using WiremockExtension with other JUnit5 extensions, another extension could unexpectedly fail. A failure would lead to wiremock server never to be started BUT JUnit will attempt to clean up all extensions with a call to extension.afterAll(extensionContext). this will trigger WiremockExtension.stopServerIfRunning() and produces a NullPointerException because the wireMockServer has never been initialised. To prevent this from happening a null check should be added like here.
Reproduction steps
Create a test that loads multiple extensions and make sure another extension loaded after the wiremock one fails.
References
No response
The text was updated successfully, but these errors were encountered:
Proposal
When using WiremockExtension with other JUnit5 extensions, another extension could unexpectedly fail. A failure would lead to wiremock server never to be started BUT JUnit will attempt to clean up all extensions with a call to
extension.afterAll(extensionContext)
. this will triggerWiremockExtension.stopServerIfRunning()
and produces a NullPointerException because thewireMockServer
has never been initialised. To prevent this from happening a null check should be added like here.Reproduction steps
Create a test that loads multiple extensions and make sure another extension loaded after the wiremock one fails.
References
No response
The text was updated successfully, but these errors were encountered: