From c930b521c4d58c107896395cb1ea239d978e2735 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Tue, 17 Dec 2024 09:37:41 +0100 Subject: [PATCH] Update version of MongoDB used for testing to 7.0 It is not the latest (8.0 was released in November) but it's probably the most common used and also it's consistent with the version used as a container. Hopefully, this will be compatible with Ubuntu 22 and 24. --- .../src/test/java/io/quarkus/mongodb/MongoTestBase.java | 2 +- .../java/io/quarkus/mongodb/MongoWithReplicasTestBase.java | 3 +-- .../test/java/io/quarkus/mongodb/reactive/MongoTestBase.java | 2 +- .../io/quarkus/mongodb/reactive/MongoWithReplicasTestBase.java | 2 +- .../main/java/io/quarkus/test/mongodb/MongoTestResource.java | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) 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 11ec3e6ed53d16..34844524c8a9e5 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 @@ -42,7 +42,7 @@ public static void startMongoDatabase() throws IOException { String uri = getConfiguredConnectionString(); // This switch allow testing against a running mongo database. if (uri == null) { - Version.Main version = Version.Main.V4_4; + Version.Main version = Version.Main.V7_0; int port = 27018; LOGGER.infof("Starting Mongo %s on port %s", version, port); 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 56c7417a7ce772..eb123a8432f104 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 @@ -1,7 +1,6 @@ package io.quarkus.mongodb; import static io.quarkus.mongodb.MongoTestBase.getConfiguredConnectionString; -import static org.awaitility.Awaitility.await; import static org.awaitility.Durations.ONE_MINUTE; import static org.awaitility.Durations.ONE_SECOND; @@ -47,7 +46,7 @@ public static void startMongoDatabase() { // This switch allow testing against a running mongo database. if (uri == null) { - startedServers = startReplicaSet(Version.Main.V4_4, 27018, "test001"); + startedServers = startReplicaSet(Version.Main.V7_0, 27018, "test001"); } else { LOGGER.infof("Using existing Mongo %s", uri); } 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 e47ac6b585c9bf..03e75e7b7bfaaf 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 @@ -55,7 +55,7 @@ public static void startMongoDatabase() throws IOException { String uri = getConfiguredConnectionString(); // This switch allow testing against a running mongo database. if (uri == null) { - Version.Main version = Version.Main.V4_4; + Version.Main version = Version.Main.V7_0; int port = 27018; LOGGER.infof("Starting Mongo %s on port %s", version, port); 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 5aae65b71a4a7e..391e1c52dd091b 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 @@ -46,7 +46,7 @@ public static void startMongoDatabase() { // This switch allow testing against a running mongo database. if (uri == null) { - startedServers = startReplicaSet(Version.Main.V4_4, 27018, "test001"); + startedServers = startReplicaSet(Version.Main.V7_0, 27018, "test001"); } else { LOGGER.infof("Using existing Mongo %s", uri); } 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 a8ca2e2ee31860..860474515a477c 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 @@ -39,7 +39,7 @@ public static IFeatureAwareVersion version(Map initArgs) { return versionArg. map(Version.Main::valueOf) .orElseGet(() -> versionArg.map( versionStr -> Versions.withFeatures(de.flapdoodle.embed.process.distribution.Version.of(versionStr))) - .orElse(Version.Main.V4_4)); + .orElse(Version.Main.V7_0)); } public static void forceExtendedSocketOptionsClassInit() {