Description
Proposal
Info
We are actually facing the issue that we are having a rest call for a configuration setup being called in an ApplicationListener using the <ApplicationReadyEvent>
. Switching from @AutoConfigureWireMock
to @EnableWireMock
brought us to the problem that our test configuration class is useless. This configuration has an ApplicationStartedEvent-Listener which was running before the ReadyListener and which gave us the opportunity to set up our wiremock-stub.
Because of WireMockSpringJunitExtension.class
it seems that all Wiremock server setup is actually running in the @BeforeEach-Phase. This seems to be too late to stub a mock in lifecycle events like application ready or started.
Feature-Request
Add a possibility to run the setup already in the @BeforeClass
phase or something similar which gives the opportunity to set up the WireMockServer before Spring lifecycle events.
References
none - sorry
Activity