@@ -166,7 +166,7 @@ describeWithMongoDB(
166166 const response = await integration . mcpClient ( ) . callTool ( {
167167 name : "insert-many" ,
168168 arguments : {
169- database : integration . randomDbName ( ) ,
169+ database : database ,
170170 collection : "test" ,
171171 documents : [ { embedding : "oopsie" } ] ,
172172 } ,
@@ -237,7 +237,7 @@ describeWithMongoDB(
237237 } ) ;
238238
239239 it ( "generates embeddings for multiple documents with the same field" , async ( ) => {
240- await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , integration . randomDbName ( ) , "test" , [
240+ await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , database , "test" , [
241241 {
242242 type : "vector" ,
243243 path : "titleEmbeddings" ,
@@ -250,7 +250,7 @@ describeWithMongoDB(
250250 const response = await integration . mcpClient ( ) . callTool ( {
251251 name : "insert-many" ,
252252 arguments : {
253- database : integration . randomDbName ( ) ,
253+ database : database ,
254254 collection : "test" ,
255255 documents : [
256256 {
@@ -388,7 +388,7 @@ describeWithMongoDB(
388388 } ) ;
389389
390390 it ( "removes redundant nested field from document when embeddings are generated" , async ( ) => {
391- await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , integration . randomDbName ( ) , "test" , [
391+ await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , database , "test" , [
392392 {
393393 type : "vector" ,
394394 path : "title.embeddings" ,
@@ -422,7 +422,7 @@ describeWithMongoDB(
422422 } ) ;
423423
424424 it ( "returns an error when input field does not have a vector search index" , async ( ) => {
425- await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , integration . randomDbName ( ) , "test" , [
425+ await createVectorSearchIndexAndWait ( integration . mongoClient ( ) , database , "test" , [
426426 {
427427 type : "vector" ,
428428 path : "titleEmbeddings" ,
0 commit comments