Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

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
@@ -263,7 +263,7 @@ public void TimeSpanIsNotSupported()
string collectionName = GetUniqueCollectionName();
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

[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

@@ -26,7 +26,7 @@ private SqliteTestStore()
protected override Task StartAsync()
{
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)

@@ -61,11 +61,6 @@ public override Task Contains_over_inline_string_array_with_weird_chars()

#endregion

// 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