-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add start/stop methods for QuarkusProdModeTest and do not setup RestAssured.port if it's configured randomly #14961
Comments
I don't really understand this, can you explain more? |
Mostly, in order to cope with test scenarios of failover cases. Example: @RegisterExtension
static final QuarkusProdModeTest nodeApp = new QuartzNodeApplicationResource();
@RegisterExtension
static final QuarkusProdModeTest masterApp = new QuartzMasterApplicationResource();
@Test
public void testFailover() {
assertMasterIsConnectedWithNode();
// simulate node failover
nodeApp.stop();
assertMasterIsNotConnectedWithNode();
nodeApp.start();
assertMasterIsConnectedWithNode();
} Also, about the rest assured, when we want to start our Quarkus application using a random port ( |
@geoand I've proposed a PR to address this issue. |
I see, thanks for the example. To be honest, @stuartwdouglas WDYT? |
I think this is a corner case, but it does seem relatively simple to support so maybe it is ok. I would like some tests for this in the PR thought. |
This module was lacking of test units. However, I've added one to support this simple use case. The PR is updated. |
Description
The JAVA process that is created as part of
QuarkusProdModeTest
follows the JUnit extension lifecycle. However, sometimes is desired to manually control the state to cope with more scenarios within the same test case.Implementation ideas
I will provide implementation ideas. Also, I would like to provide a solution for this enhancement by myself.
The text was updated successfully, but these errors were encountered: