diff --git a/.evergreen/.evg.yml b/.evergreen/.evg.yml index 49cd8b20954..70dd6b00c5e 100644 --- a/.evergreen/.evg.yml +++ b/.evergreen/.evg.yml @@ -113,6 +113,8 @@ functions: cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS else git clone --depth 1 https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS + # TEST TEST TEST TODO(apmasell): do not merge; remove and include upstream + sed -i -e 's/"autoIndexingEnabled" : false/"autoIndexingEnabled" : true/g' ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh fi echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config diff --git a/driver-sync/src/test/functional/com/mongodb/client/AbstractAtlasSearchIndexManagementProseTest.java b/driver-sync/src/test/functional/com/mongodb/client/AbstractAtlasSearchIndexManagementProseTest.java index 1685a79fce2..8c458c5b633 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/AbstractAtlasSearchIndexManagementProseTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/AbstractAtlasSearchIndexManagementProseTest.java @@ -289,9 +289,6 @@ public void shouldRequireExplicitTypeToCreateVectorSearchIndex() { @Test @DisplayName("should fail when invalid model name was used for auto embedding index") void shouldFailWhenInvalidModelNameWasUsed() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - assertThrows( MongoCommandException.class, () -> createAutoEmbeddingIndex("test"), @@ -302,9 +299,6 @@ void shouldFailWhenInvalidModelNameWasUsed() { @Test @DisplayName("should fail to create auto embedding index without model") void shouldFailToCreateAutoEmbeddingIndexWithoutModel() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( @@ -326,9 +320,6 @@ void shouldFailToCreateAutoEmbeddingIndexWithoutModel() { @ParameterizedTest(name = "should create auto embedding index with {0} quantization") @ValueSource(strings = {"float", "scalar", "binary", "binaryNoRescore"}) void shouldCreateAutoEmbeddingIndexWithQuantization(final String quantization) { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - final String indexName = AUTO_EMBED_INDEX_NAME + "_" + quantization; SearchIndexModel indexModel = new SearchIndexModel( indexName, @@ -352,9 +343,6 @@ void shouldCreateAutoEmbeddingIndexWithQuantization(final String quantization) { @Disabled("Currently numDimensions can't be used, it fails with server error:" + " 'Invalid numDimensions value for autoEmbed field. Expected an integer.'") void shouldCreateAutoEmbeddingIndexWithCustomNumDimensions() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( @@ -375,9 +363,6 @@ void shouldCreateAutoEmbeddingIndexWithCustomNumDimensions() { @Test @DisplayName("should create auto embedding index with filter field") void shouldCreateAutoEmbeddingIndexWithFilterField() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( @@ -399,9 +384,6 @@ void shouldCreateAutoEmbeddingIndexWithFilterField() { @Test @DisplayName("should fail when mixing vector and autoEmbed types in the same index") void shouldFailWhenMixingVectorAndAutoEmbedTypes() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( @@ -428,9 +410,6 @@ void shouldFailWhenMixingVectorAndAutoEmbedTypes() { @Test @DisplayName("should fail when duplicate paths are used in auto embedding index") void shouldFailWhenDuplicatePathsAreUsed() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( @@ -457,9 +436,6 @@ void shouldFailWhenDuplicatePathsAreUsed() { @Test @DisplayName("should fail when autoEmbed field is used as filter field") void shouldFailWhenAutoEmbedFieldUsedAsFilterField() { - //TODO-JAVA-6059 remove this assumption when auto embedding is generally available - Assumptions.assumeTrue(false); - SearchIndexModel indexModel = new SearchIndexModel( AUTO_EMBED_INDEX_NAME, new Document( diff --git a/driver-sync/src/test/functional/com/mongodb/client/model/search/AbstractAutoEmbeddingVectorSearchFunctionalTest.java b/driver-sync/src/test/functional/com/mongodb/client/model/search/AbstractAutoEmbeddingVectorSearchFunctionalTest.java index 0fa69708c9c..322513107a8 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/model/search/AbstractAutoEmbeddingVectorSearchFunctionalTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/model/search/AbstractAutoEmbeddingVectorSearchFunctionalTest.java @@ -40,6 +40,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; +import static com.mongodb.ClusterFixture.isStandalone; import static com.mongodb.MongoClientSettings.getDefaultCodecRegistry; import static com.mongodb.client.model.Aggregates.vectorSearch; import static com.mongodb.client.model.search.SearchPath.fieldPath; @@ -49,6 +50,7 @@ import static java.util.Arrays.asList; import static org.bson.codecs.configuration.CodecRegistries.fromProviders; import static org.bson.codecs.configuration.CodecRegistries.fromRegistries; +import static org.junit.jupiter.api.Assumptions.assumeFalse; /** * Tests for auto-embedding vector search queries. @@ -71,9 +73,8 @@ public abstract class AbstractAutoEmbeddingVectorSearchFunctionalTest { @BeforeAll void setUpOnce() throws InterruptedException { - //TODO-JAVA-6059 remove this assumption when Atlas Vector Search with automated embedding is generally available - Assumptions.assumeTrue(false); - + Assumptions.assumeTrue(ClusterFixture.isAtlasSearchTest(), "Atlas Search Index tests are disabled"); + assumeFalse(isStandalone(), "Vector search functional tests are not support on standalone instances"); mongoClient = getMongoClient(getMongoClientSettingsBuilder() .codecRegistry(CODEC_REGISTRY) .build());