diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoTestBase.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoTestBase.java index 34844524c8a9e..c7359fa000824 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoTestBase.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoTestBase.java @@ -11,6 +11,7 @@ import de.flapdoodle.embed.mongo.distribution.Version; import de.flapdoodle.embed.mongo.transitions.Mongod; import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess; +import de.flapdoodle.embed.process.types.ProcessConfig; import de.flapdoodle.reverse.TransitionWalker; import de.flapdoodle.reverse.transitions.Start; @@ -53,6 +54,9 @@ public static void startMongoDatabase() throws IOException { .build())) .withMongodArguments(Start.to(MongodArguments.class) .initializedWith(MongodArguments.defaults().withUseNoJournal(false))) + .withProcessConfig( + Start.to(ProcessConfig.class) + .initializedWith(ProcessConfig.defaults().withStopTimeoutInMillis(15_000))) .start(version); } else { diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoWithReplicasTestBase.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoWithReplicasTestBase.java index eb123a8432f10..d2c39cc1e6e12 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoWithReplicasTestBase.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoWithReplicasTestBase.java @@ -31,6 +31,7 @@ import de.flapdoodle.embed.mongo.transitions.Mongod; import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess; import de.flapdoodle.embed.process.io.ProcessOutput; +import de.flapdoodle.embed.process.types.ProcessConfig; import de.flapdoodle.reverse.TransitionWalker; import de.flapdoodle.reverse.transitions.Start; @@ -92,7 +93,10 @@ private static Mongod mongodWithPort(int port, String replicaSet) { .withProcessOutput(Start.to(ProcessOutput.class).initializedWith(ProcessOutput.silent())) .withMongodArguments(Start.to(MongodArguments.class).initializedWith( MongodArguments.defaults().withArgs(Map.of("--replSet", replicaSet)).withSyncDelay(10) - .withUseSmallFiles(true).withUseNoJournal(false))); + .withUseSmallFiles(true).withUseNoJournal(false))) + .withProcessConfig( + Start.to(ProcessConfig.class) + .initializedWith(ProcessConfig.defaults().withStopTimeoutInMillis(15_000))); } @AfterAll diff --git a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoTestBase.java b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoTestBase.java index 03e75e7b7bfaa..a153208a266e5 100644 --- a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoTestBase.java +++ b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoTestBase.java @@ -21,6 +21,7 @@ import de.flapdoodle.embed.mongo.distribution.Version; import de.flapdoodle.embed.mongo.transitions.Mongod; import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess; +import de.flapdoodle.embed.process.types.ProcessConfig; import de.flapdoodle.reverse.TransitionWalker; import de.flapdoodle.reverse.transitions.Start; import io.smallrye.mutiny.Uni; @@ -66,6 +67,9 @@ public static void startMongoDatabase() throws IOException { .build())) .withMongodArguments(Start.to(MongodArguments.class) .initializedWith(MongodArguments.defaults().withUseNoJournal(false))) + .withProcessConfig( + Start.to(ProcessConfig.class) + .initializedWith(ProcessConfig.defaults().withStopTimeoutInMillis(15_000))) .start(version); } else { diff --git a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoWithReplicasTestBase.java b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoWithReplicasTestBase.java index 391e1c52dd091..a6829f9a95af7 100644 --- a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoWithReplicasTestBase.java +++ b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/MongoWithReplicasTestBase.java @@ -31,6 +31,7 @@ import de.flapdoodle.embed.mongo.transitions.Mongod; import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess; import de.flapdoodle.embed.process.io.ProcessOutput; +import de.flapdoodle.embed.process.types.ProcessConfig; import de.flapdoodle.reverse.TransitionWalker; import de.flapdoodle.reverse.transitions.Start; @@ -92,7 +93,10 @@ private static Mongod mongodWithPort(int port, String replicaSet) { .withProcessOutput(Start.to(ProcessOutput.class).initializedWith(ProcessOutput.silent())) .withMongodArguments(Start.to(MongodArguments.class).initializedWith( MongodArguments.defaults().withArgs(Map.of("--replSet", replicaSet)).withSyncDelay(10) - .withUseSmallFiles(true).withUseNoJournal(false))); + .withUseSmallFiles(true).withUseNoJournal(false))) + .withProcessConfig( + Start.to(ProcessConfig.class) + .initializedWith(ProcessConfig.defaults().withStopTimeoutInMillis(15_000))); } @AfterAll diff --git a/test-framework/mongodb/src/main/java/io/quarkus/test/mongodb/MongoTestResource.java b/test-framework/mongodb/src/main/java/io/quarkus/test/mongodb/MongoTestResource.java index 860474515a477..2481e8b1822f2 100644 --- a/test-framework/mongodb/src/main/java/io/quarkus/test/mongodb/MongoTestResource.java +++ b/test-framework/mongodb/src/main/java/io/quarkus/test/mongodb/MongoTestResource.java @@ -13,6 +13,7 @@ import de.flapdoodle.embed.mongo.distribution.Versions; import de.flapdoodle.embed.mongo.transitions.Mongod; import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess; +import de.flapdoodle.embed.process.types.ProcessConfig; import de.flapdoodle.reverse.TransitionWalker; import de.flapdoodle.reverse.transitions.Start; import io.quarkus.test.common.QuarkusTestResourceLifecycleManager; @@ -68,6 +69,8 @@ public Map start() { .initializedWith(Net.builder().from(Net.defaults()).port(port).build())) .withMongodArguments(Start.to(MongodArguments.class) .initializedWith(MongodArguments.defaults().withUseNoJournal(false))) + .withProcessConfig( + Start.to(ProcessConfig.class).initializedWith(ProcessConfig.defaults().withStopTimeoutInMillis(15_000))) .start(version); return Collections.singletonMap("quarkus.mongodb.hosts", String.format("127.0.0.1:%d", port));