Skip to content

Commit

Permalink
Raise stop timeout hoping it will solve the Windows issue...
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Dec 18, 2024
1 parent c484c6f commit 2849a15
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -68,6 +69,8 @@ public Map<String, String> 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));
Expand Down

0 comments on commit 2849a15

Please sign in to comment.