mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-10 13:15:27 +00:00
Improve test stability on OSX (#453)
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
<mvnd.test.hostLocalMavenRepo>${settings.localRepository}</mvnd.test.hostLocalMavenRepo>
|
||||
<preinstall.artifacts>${preinstall.artifacts}</preinstall.artifacts>
|
||||
</systemPropertyVariables>
|
||||
<rerunFailingTestsCount>2</rerunFailingTestsCount>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@@ -24,6 +24,7 @@ import org.junit.jupiter.api.condition.OS;
|
||||
import org.mvndaemon.mvnd.assertj.TestClientOutput;
|
||||
import org.mvndaemon.mvnd.client.Client;
|
||||
import org.mvndaemon.mvnd.client.DaemonParameters;
|
||||
import org.mvndaemon.mvnd.common.DaemonInfo;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import org.mvndaemon.mvnd.junit.TestRegistry;
|
||||
|
||||
@@ -46,7 +47,7 @@ public class BootstrapPluginTest {
|
||||
void cleanInstall() throws IOException, InterruptedException {
|
||||
assertDaemonRegistrySize(0);
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
final TestClientOutput output = new TestClientOutput();
|
||||
try {
|
||||
client.execute(output, "clean", "install", "-e", "-Dmvnd.log.level=DEBUG").assertSuccess();
|
||||
@@ -55,7 +56,9 @@ public class BootstrapPluginTest {
|
||||
fail("Error", e);
|
||||
}
|
||||
assertDaemonRegistrySize(1);
|
||||
Thread.sleep(100);
|
||||
/* Wait, till the instance becomes idle */
|
||||
DaemonInfo d = registry.getAll().get(0);
|
||||
registry.awaitIdle(d.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,6 +59,8 @@ public class StopStatusTest {
|
||||
client.execute(new TestClientOutput(), "clean").assertSuccess();
|
||||
/* There should still be exactly one item in the registry after the second build */
|
||||
assertDaemonRegistrySize(1);
|
||||
/* Wait, till the instance becomes idle */
|
||||
registry.awaitIdle(d.getId());
|
||||
|
||||
client.execute(new TestClientOutput(), "--stop").assertSuccess();
|
||||
/* No items in the registry after we have killed all daemons */
|
||||
|
Reference in New Issue
Block a user