From 01060f2c897984dffe83bcf2ef9b8ead23c605eb Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 26 Dec 2024 14:39:45 +0100 Subject: [PATCH] Disable tests using replicas on Windows It seems that the replicas are not correctly shut down and it leads to job timeouts. --- .../quarkus/mongodb/DefaultAndNamedMongoClientConfigTest.java | 3 +++ .../java/io/quarkus/mongodb/DefaultMongoClientConfigTest.java | 3 +++ .../test/java/io/quarkus/mongodb/MongoClientConfigTest.java | 3 +++ .../java/io/quarkus/mongodb/NamedMongoClientConfigTest.java | 3 +++ .../io/quarkus/mongodb/NamedReactiveMongoClientConfigTest.java | 3 +++ .../quarkus/mongodb/reactive/ConnectionToReplicaSetTest.java | 3 +++ .../java/io/quarkus/mongodb/reactive/ListDatabaseTest.java | 3 +++ 7 files changed, 21 insertions(+) diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultAndNamedMongoClientConfigTest.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultAndNamedMongoClientConfigTest.java index 9c8d367e1bc4a..61f1c87a8f5b6 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultAndNamedMongoClientConfigTest.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultAndNamedMongoClientConfigTest.java @@ -11,6 +11,8 @@ import org.eclipse.microprofile.health.HealthCheckResponse; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.extension.RegisterExtension; import com.mongodb.client.MongoClient; @@ -21,6 +23,7 @@ import io.quarkus.mongodb.health.MongoHealthCheck; import io.quarkus.test.QuarkusUnitTest; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") public class DefaultAndNamedMongoClientConfigTest extends MongoWithReplicasTestBase { @RegisterExtension diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultMongoClientConfigTest.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultMongoClientConfigTest.java index 45f9e74bb0a6b..bc9b08b54e5c8 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultMongoClientConfigTest.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/DefaultMongoClientConfigTest.java @@ -11,6 +11,8 @@ import org.eclipse.microprofile.health.HealthCheckResponse; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.extension.RegisterExtension; import com.mongodb.client.MongoClient; @@ -19,6 +21,7 @@ import io.quarkus.mongodb.reactive.ReactiveMongoClient; import io.quarkus.test.QuarkusUnitTest; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") public class DefaultMongoClientConfigTest extends MongoWithReplicasTestBase { @RegisterExtension diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoClientConfigTest.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoClientConfigTest.java index 3708be970d06e..97161fe578bfb 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoClientConfigTest.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/MongoClientConfigTest.java @@ -8,6 +8,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.extension.RegisterExtension; import com.mongodb.ReadConcern; @@ -21,6 +23,7 @@ import io.quarkus.mongodb.reactive.ReactiveMongoClient; import io.quarkus.test.QuarkusUnitTest; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") public class MongoClientConfigTest extends MongoWithReplicasTestBase { @RegisterExtension diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedMongoClientConfigTest.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedMongoClientConfigTest.java index 6dae624333538..39cb46564542d 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedMongoClientConfigTest.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedMongoClientConfigTest.java @@ -13,6 +13,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.extension.RegisterExtension; import com.mongodb.client.MongoClient; @@ -23,6 +25,7 @@ import io.quarkus.mongodb.health.MongoHealthCheck; import io.quarkus.test.QuarkusUnitTest; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") public class NamedMongoClientConfigTest extends MongoWithReplicasTestBase { @RegisterExtension static final QuarkusUnitTest config = new QuarkusUnitTest() diff --git a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedReactiveMongoClientConfigTest.java b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedReactiveMongoClientConfigTest.java index a5b2909d53d1d..97129aecc5c13 100644 --- a/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedReactiveMongoClientConfigTest.java +++ b/extensions/mongodb-client/deployment/src/test/java/io/quarkus/mongodb/NamedReactiveMongoClientConfigTest.java @@ -14,6 +14,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.extension.RegisterExtension; import com.mongodb.reactivestreams.client.MongoClient; @@ -28,6 +30,7 @@ import io.quarkus.mongodb.reactive.ReactiveMongoClient; import io.quarkus.test.QuarkusUnitTest; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") public class NamedReactiveMongoClientConfigTest extends MongoWithReplicasTestBase { @RegisterExtension diff --git a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ConnectionToReplicaSetTest.java b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ConnectionToReplicaSetTest.java index e3970981d685a..fc5320a87048a 100644 --- a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ConnectionToReplicaSetTest.java +++ b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ConnectionToReplicaSetTest.java @@ -10,6 +10,8 @@ import org.bson.Document; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import com.mongodb.client.model.changestream.FullDocument; import com.mongodb.reactivestreams.client.MongoClients; @@ -17,6 +19,7 @@ import io.quarkus.mongodb.ChangeStreamOptions; import io.quarkus.mongodb.impl.ReactiveMongoClientImpl; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") class ConnectionToReplicaSetTest extends MongoWithReplicasTestBase { private ReactiveMongoClient client; diff --git a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ListDatabaseTest.java b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ListDatabaseTest.java index a3c8599cc6df9..2131c874d679f 100644 --- a/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ListDatabaseTest.java +++ b/extensions/mongodb-client/runtime/src/test/java/io/quarkus/mongodb/reactive/ListDatabaseTest.java @@ -8,6 +8,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import com.mongodb.ClientSessionOptions; import com.mongodb.reactivestreams.client.ClientSession; @@ -15,6 +17,7 @@ import io.quarkus.mongodb.impl.ReactiveMongoClientImpl; +@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Flapdoodle doesn't work very well on Windows with replicas") class ListDatabaseTest extends MongoWithReplicasTestBase { private ReactiveMongoClient client;