Skip to content

.Net MEVD: Getting integration tests green 1/n#12162

Merged
adamsitnik merged 7 commits intomicrosoft:feature-vector-data-preb3from
adamsitnik:passingTests
May 19, 2025
Merged

.Net MEVD: Getting integration tests green 1/n#12162
adamsitnik merged 7 commits intomicrosoft:feature-vector-data-preb3from
adamsitnik:passingTests

Conversation

@adamsitnik
Copy link
Member

No description provided.

@adamsitnik adamsitnik requested review from roji and westey-m May 19, 2025 11:32
@adamsitnik adamsitnik requested a review from a team as a code owner May 19, 2025 11:32
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label May 19, 2025
var testStore = fixture.TestStore;

Assert.Throws<ArgumentException>(() => testStore.DefaultVectorStore.GetCollection<string, TimeModel>(collectionName));
Assert.Throws<NotSupportedException>(() => testStore.DefaultVectorStore.GetCollection<string, TimeModel>(collectionName));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is called TimeSpanIsNotSupported so it's a good thing we throw NotSupportedException now

using Xunit;

[assembly: SqliteVecIntegrationTests.Support.SqliteVecRequired]
// Disable test parallelization in order to prevent from "database is locked" errors
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we keep getting "database is locked" and I don't have the time to find out today, but just running the test sequentially solves the problem

internal static bool IsSqliteVecInstalled
{
get
catch (TypeInitializationException ex)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far we were assuming that SqliteConnection can be used an maybe the load of the extension will just fail.

It turned out that on Full Framework we just may not be able to use SqliteConnection itself due to some missing native dependencies in the NuGet package

{
this._databasePath = Path.GetTempFileName();
this._connectionString = $"Data Source={this._databasePath}";
this._connectionString = $"Data Source={this._databasePath};Pooling=false";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleanup removes the file and it was sometimes failing with file in use. Disabling the pooling solves the problem (as there are no open connections in the pool I guess)


// In Weaviate, string equality on multi-word textual properties depends on tokenization
// (https://weaviate.io/developers/weaviate/api/graphql/filters#multi-word-queries-in-equal-filters)
public override Task Equal_with_string_is_not_Contains()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just works as expected on my machine and does not throw FailException

@adamsitnik adamsitnik merged commit f4f3669 into microsoft:feature-vector-data-preb3 May 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants