diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/ArrayFiltersQueryIntegrationTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/ArrayFiltersQueryIntegrationTest.java index d0903b17..e6361f21 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/ArrayFiltersQueryIntegrationTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/ArrayFiltersQueryIntegrationTest.java @@ -97,7 +97,7 @@ private static void initializeAndConnectToPostgres() { private static void initializeAndConnectToMongo() { mongo = - new GenericContainer<>(DockerImageName.parse("mongo:7.0.14")) + new GenericContainer<>(DockerImageName.parse("mongo:8.0.1")) .withExposedPorts(27017) .waitingFor(Wait.forListeningPort()); mongo.start(); diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java index b96287a8..8f580d08 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java @@ -132,7 +132,7 @@ public class DocStoreQueryV1Test { public static void init() throws IOException { datastoreMap = Maps.newHashMap(); mongo = - new GenericContainer<>(DockerImageName.parse("mongo:7.0.14")) + new GenericContainer<>(DockerImageName.parse("mongo:8.0.1")) .withExposedPorts(27017) .waitingFor(Wait.forListeningPort()); mongo.start(); diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java index e685c3b3..bebd0302 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreTest.java @@ -71,7 +71,7 @@ public class DocStoreTest { public static void init() { datastoreMap = Maps.newHashMap(); mongo = - new GenericContainer<>(DockerImageName.parse("mongo:7.0.14")) + new GenericContainer<>(DockerImageName.parse("mongo:8.0.1")) .withExposedPorts(27017) .waitingFor(Wait.forListeningPort()); mongo.start(); diff --git a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/mongo/MongoDocStoreTest.java b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/mongo/MongoDocStoreTest.java index 8c60844a..488f77ae 100644 --- a/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/mongo/MongoDocStoreTest.java +++ b/document-store/src/integrationTest/java/org/hypertrace/core/documentstore/mongo/MongoDocStoreTest.java @@ -75,7 +75,7 @@ public class MongoDocStoreTest { @BeforeAll public static void init() { mongo = - new GenericContainer<>(DockerImageName.parse("mongo:7.0.14")) + new GenericContainer<>(DockerImageName.parse("mongo:8.0.1")) .withExposedPorts(27017) .waitingFor(Wait.forListeningPort()); mongo.start(); diff --git a/document-store/src/main/java/org/hypertrace/core/documentstore/model/options/QueryOptions.java b/document-store/src/main/java/org/hypertrace/core/documentstore/model/options/QueryOptions.java index 571ca90f..0410e850 100644 --- a/document-store/src/main/java/org/hypertrace/core/documentstore/model/options/QueryOptions.java +++ b/document-store/src/main/java/org/hypertrace/core/documentstore/model/options/QueryOptions.java @@ -1,6 +1,7 @@ package org.hypertrace.core.documentstore.model.options; import java.time.Duration; +import javax.annotation.Nullable; import lombok.Builder; import lombok.Builder.Default; import lombok.Value; @@ -13,5 +14,5 @@ public class QueryOptions { public static final QueryOptions DEFAULT_QUERY_OPTIONS = QueryOptions.builder().build(); @Default DataFreshness dataFreshness = DataFreshness.SYSTEM_DEFAULT; - @Default Duration queryTimeout = Duration.ofMinutes(1); + @Default @Nullable Duration queryTimeout = null; } diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/mongo/MongoQueryExecutorTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/mongo/MongoQueryExecutorTest.java index 9d72984a..7296a159 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/mongo/MongoQueryExecutorTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/mongo/MongoQueryExecutorTest.java @@ -752,19 +752,6 @@ void testConnectionLevelQueryTimeout() { validate(duration); } - @Test - void testConnectionLevelQueryTimeoutWithNullValue() { - final Query query = - Query.builder() - .addSelection(AggregateExpression.of(COUNT, ConstantExpression.of(1)), "total") - .build(); - - when(connectionConfig.queryTimeout()).thenReturn(null); - executor.aggregate(query, QueryOptions.DEFAULT_QUERY_OPTIONS); - - validate(Duration.ofMinutes(1)); - } - @Test void testConnectionAndQueryLevelQueryTimeout() { final Query query = diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 51f83cc6..86a9a6ec 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,7 +26,7 @@ org-junit-jupiter-junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", org-mockito-mockito-core = { module = "org.mockito:mockito-core", version.ref = "org-mockito" } org-mockito-mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "org-mockito" } org-mockito-mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "org-mockito" } -org-mongodb-mongodb-driver-sync = { module = "org.mongodb:mongodb-driver-sync", version = "5.1.4" } +org-mongodb-mongodb-driver-sync = { module = "org.mongodb:mongodb-driver-sync", version = "5.2.0" } org-postgresql = { module = "org.postgresql:postgresql", version = "42.5.5" } org-projectlombok-lombok = { module = "org.projectlombok:lombok", version = "1.18.30" } org-slf4j-slf4j-api = { module = "org.slf4j:slf4j-api", version = "1.7.36" }