Skip to content

Commit a39b2ba

Browse files
authored
.Net: [MEVD] Conformance tests for multi-vector records (#13319)
Closes #11709
1 parent b697358 commit a39b2ba

File tree

24 files changed

+381
-44
lines changed

24 files changed

+381
-44
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using AzureAISearch.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace AzureAISearch.ConformanceTests.ModelTests;
9+
10+
public class AzureAISearchMultiVectorModelTests(AzureAISearchMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<AzureAISearchMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override string CollectionName => "multi-vector-" + AzureAISearchTestEnvironment.TestIndexPostfix;
16+
17+
public override TestStore TestStore => AzureAISearchTestStore.Instance;
18+
}
19+
}

dotnet/test/VectorData/AzureAISearch.ConformanceTests/Support/AzureAISearchTestStore.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ public override async Task WaitForDataAsync<TKey, TRecord>(
4848
VectorStoreCollection<TKey, TRecord> collection,
4949
int recordCount,
5050
Expression<Func<TRecord, bool>>? filter = null,
51+
Expression<Func<TRecord, object?>>? vectorProperty = null,
5152
int? vectorSize = null,
5253
object? dummyVector = null)
5354
{
54-
await base.WaitForDataAsync(collection, recordCount, filter, vectorSize, dummyVector);
55+
await base.WaitForDataAsync(collection, recordCount, filter, vectorProperty, vectorSize, dummyVector);
5556

5657
// There seems to be some asynchronicity/race condition specific to Azure AI Search which isn't taken care
5758
// of by the generic retry loop in the base implementation.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using CosmosMongoDB.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace CosmosMongoDB.ConformanceTests.ModelTests;
9+
10+
public class CosmosMongoMultiVectorModelTests(CosmosMongoMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<CosmosMongoMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override TestStore TestStore => CosmosMongoTestStore.Instance;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using CosmosNoSql.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace CosmosNoSql.ConformanceTests.ModelTests;
9+
10+
public class CosmosNoSqlMultiVectorModelTests(CosmosNoSqlMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<CosmosNoSqlMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override TestStore TestStore => CosmosNoSqlTestStore.Instance;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using InMemory.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace InMemory.ConformanceTests.ModelTests;
9+
10+
public class InMemoryMultiVectorModelTests(InMemoryMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<InMemoryMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override TestStore TestStore => InMemoryTestStore.Instance;
16+
}
17+
}

dotnet/test/VectorData/InMemory.ConformanceTests/Support/InMemoryDynamicDataModelFixture.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

dotnet/test/VectorData/InMemory.ConformanceTests/Support/InMemorySimpleModelFixture.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using MongoDB.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace MongoDB.ConformanceTests.ModelTests;
9+
10+
public class MongoMultiVectorModelTests(MongoMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<MongoMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override TestStore TestStore => MongoTestStore.Instance;
16+
}
17+
}

dotnet/test/VectorData/MongoDB.ConformanceTests/Support/MongoSimpleModelFixture.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using PgVector.ConformanceTests.Support;
4+
using VectorData.ConformanceTests.ModelTests;
5+
using VectorData.ConformanceTests.Support;
6+
using Xunit;
7+
8+
namespace PgVector.ConformanceTests.ModelTests;
9+
10+
public class PostgresMultiVectorModelTests(PostgresMultiVectorModelTests.Fixture fixture)
11+
: MultiVectorModelTests<string>(fixture), IClassFixture<PostgresMultiVectorModelTests.Fixture>
12+
{
13+
public new class Fixture : MultiVectorModelTests<string>.Fixture
14+
{
15+
public override TestStore TestStore => PostgresTestStore.Instance;
16+
}
17+
}

0 commit comments

Comments
 (0)