From 5c24c5da7c84f1e166f63eaee5366ab37a981e02 Mon Sep 17 00:00:00 2001 From: Gil Alon <47804748+galon1@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:51:08 -0400 Subject: [PATCH] SERVER-109490 Use unique collection names in hybrid search integration tests (#40267) (#42229) GitOrigin-RevId: a5696a48a6032bf683920b7c20f7abab0aedd270 --- .../e2e/hybridSearch/rank_fusion_failure_assertions.js | 2 +- .../e2e/hybridSearch/ranked_fusion_multipipeline_test.js | 2 +- .../e2e/hybridSearch/ranked_fusion_score_details_test.js | 4 +++- jstests/with_mongot/e2e/hybridSearch/ranked_fusion_test.js | 2 +- .../hybridSearch/ranked_fusion_verbose_replace_root_test.js | 2 +- .../e2e/hybridSearch/ranked_fusion_verbose_test.js | 2 +- .../e2e/hybridSearch/score_fusion_failure_assertions.js | 2 +- .../e2e/hybridSearch/score_fusion_score_details_test.js | 2 +- .../with_mongot/e2e/hybridSearch/score_fusion_verbose_test.js | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/jstests/with_mongot/e2e/hybridSearch/rank_fusion_failure_assertions.js b/jstests/with_mongot/e2e/hybridSearch/rank_fusion_failure_assertions.js index bf33c9bb5dd..77118df701f 100644 --- a/jstests/with_mongot/e2e/hybridSearch/rank_fusion_failure_assertions.js +++ b/jstests/with_mongot/e2e/hybridSearch/rank_fusion_failure_assertions.js @@ -12,7 +12,7 @@ * ] */ -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db[collName]; function runPipeline(pipeline) { diff --git a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_multipipeline_test.js b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_multipipeline_test.js index 9eeacaf5d52..cd08226b8c6 100644 --- a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_multipipeline_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_multipipeline_test.js @@ -13,7 +13,7 @@ import { datasets, } from "jstests/with_mongot/e2e_lib/search_e2e_utils.js"; -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); diff --git a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_score_details_test.js b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_score_details_test.js index da89a1661e0..ec738482d8e 100644 --- a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_score_details_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_score_details_test.js @@ -15,7 +15,7 @@ import { } from "jstests/with_mongot/e2e_lib/data/movies.js"; import {getRentalData, getRentalSearchIndexSpec} from "jstests/with_mongot/e2e_lib/data/rentals.js"; -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); @@ -559,4 +559,6 @@ dropSearchIndex(coll, {name: getMovieVectorSearchIndexSpec().name}); assert.eq(score, geoNearScore + searchScore); } + + dropSearchIndex(coll, {name: getRentalSearchIndexSpec().name}); })(); diff --git a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_test.js b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_test.js index 9ecee1eb2e1..0626c10a346 100644 --- a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_test.js @@ -16,7 +16,7 @@ import { datasets, } from "jstests/with_mongot/e2e_lib/search_e2e_utils.js"; -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); diff --git a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_replace_root_test.js b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_replace_root_test.js index c5a2dfc2fd9..e15dd2bafb1 100644 --- a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_replace_root_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_replace_root_test.js @@ -17,7 +17,7 @@ import { datasets, } from "jstests/with_mongot/e2e_lib/search_e2e_utils.js"; -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); diff --git a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_test.js b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_test.js index d0482a33b7a..76d4e616284 100644 --- a/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/ranked_fusion_verbose_test.js @@ -19,7 +19,7 @@ import { datasets, } from "jstests/with_mongot/e2e_lib/search_e2e_utils.js"; -const collName = "search_rank_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); diff --git a/jstests/with_mongot/e2e/hybridSearch/score_fusion_failure_assertions.js b/jstests/with_mongot/e2e/hybridSearch/score_fusion_failure_assertions.js index 5f90dfcd32d..50ef5ff5102 100644 --- a/jstests/with_mongot/e2e/hybridSearch/score_fusion_failure_assertions.js +++ b/jstests/with_mongot/e2e/hybridSearch/score_fusion_failure_assertions.js @@ -13,7 +13,7 @@ * ] */ -const collName = "search_score_fusion"; +const collName = jsTestName(); const coll = db[collName]; const vectorSearchClauseAndSearchClause = { diff --git a/jstests/with_mongot/e2e/hybridSearch/score_fusion_score_details_test.js b/jstests/with_mongot/e2e/hybridSearch/score_fusion_score_details_test.js index e7f9ad3c474..0e4f3cbb798 100644 --- a/jstests/with_mongot/e2e/hybridSearch/score_fusion_score_details_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/score_fusion_score_details_test.js @@ -14,7 +14,7 @@ import { getMovieVectorSearchIndexSpec } from "jstests/with_mongot/e2e_lib/data/movies.js"; -const collName = "search_score_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop(); diff --git a/jstests/with_mongot/e2e/hybridSearch/score_fusion_verbose_test.js b/jstests/with_mongot/e2e/hybridSearch/score_fusion_verbose_test.js index 6468f42fec0..a9f10e0b0b5 100644 --- a/jstests/with_mongot/e2e/hybridSearch/score_fusion_verbose_test.js +++ b/jstests/with_mongot/e2e/hybridSearch/score_fusion_verbose_test.js @@ -19,7 +19,7 @@ import { datasets, } from "jstests/with_mongot/e2e_lib/search_e2e_utils.js"; -const collName = "search_score_fusion"; +const collName = jsTestName(); const coll = db.getCollection(collName); coll.drop();