From e7c0a9a8d47dd832aabff12caad551083d3dd850 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Tue, 17 Oct 2023 15:00:11 +0200 Subject: [PATCH] Start MongoDB 4.4 instead of 4.0 It's now impossible to start MongoDB 4.0 on a Fedora 38 so let's move to a more modern version for our tests. (cherry picked from commit e915afe816727212135d5a1f9bfddcdb6da65d70) --- .../src/test/java/io/quarkus/mongodb/MongoTestBase.java | 2 +- .../test/java/io/quarkus/mongodb/MongoWithReplicasTestBase.java | 2 +- .../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(+), 5 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 c925e23643845..11ec3e6ed53d1 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_0; + Version.Main version = Version.Main.V4_4; 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 19e609c333c5e..56c7417a7ce77 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 @@ -47,7 +47,7 @@ public static void startMongoDatabase() { // This switch allow testing against a running mongo database. if (uri == null) { - startedServers = startReplicaSet(Version.Main.V4_0, 27018, "test001"); + startedServers = startReplicaSet(Version.Main.V4_4, 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 fff2b6e33ce48..e47ac6b585c9b 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_0; + Version.Main version = Version.Main.V4_4; 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 9d8c75626a4b6..5aae65b71a4a7 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_0, 27018, "test001"); + startedServers = startReplicaSet(Version.Main.V4_4, 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 3f59aada22e60..a8ca2e2ee3186 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_0)); + .orElse(Version.Main.V4_4)); } public static void forceExtendedSocketOptionsClassInit() {