diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 440d6855..b5936c08 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,9 +5,11 @@ A clear description of the change and why it's being made. ## Which component(s) does this affect? - [ ] Full Dashboard -- [ ] Lite +- [ ] Lite Dashboard +- [ ] Lite Tests - [ ] SQL collection scripts -- [ ] Installer +- [ ] CLI Installer +- [ ] GUI Installer - [ ] Documentation ## How was this tested? diff --git a/Lite.Tests/DuckDbSchemaTests.cs b/Lite.Tests/DuckDbSchemaTests.cs index e8415ab5..a0460b36 100644 --- a/Lite.Tests/DuckDbSchemaTests.cs +++ b/Lite.Tests/DuckDbSchemaTests.cs @@ -72,13 +72,13 @@ public async Task InitializeAsync_CreatesAllTables() }; using var connection = new DuckDBConnection($"Data Source={_dbPath}"); - await connection.OpenAsync(); + await connection.OpenAsync(TestContext.Current.CancellationToken); foreach (var table in expectedTables) { using var cmd = connection.CreateCommand(); cmd.CommandText = $"SELECT COUNT(*) FROM information_schema.tables WHERE table_name = '{table}'"; - var count = Convert.ToInt32(await cmd.ExecuteScalarAsync()); + var count = Convert.ToInt32(await cmd.ExecuteScalarAsync(TestContext.Current.CancellationToken)); Assert.True(count == 1, $"Table '{table}' should exist but was not found"); } } @@ -90,11 +90,11 @@ public async Task InitializeAsync_SetsCorrectSchemaVersion() await initializer.InitializeAsync(); using var connection = new DuckDBConnection($"Data Source={_dbPath}"); - await connection.OpenAsync(); + await connection.OpenAsync(TestContext.Current.CancellationToken); using var cmd = connection.CreateCommand(); cmd.CommandText = "SELECT MAX(version) FROM schema_version"; - var version = Convert.ToInt32(await cmd.ExecuteScalarAsync()); + var version = Convert.ToInt32(await cmd.ExecuteScalarAsync(TestContext.Current.CancellationToken)); Assert.Equal(DuckDbInitializer.CurrentSchemaVersion, version); } @@ -109,11 +109,11 @@ public async Task InitializeAsync_IsIdempotent() await initializer.InitializeAsync(); using var connection = new DuckDBConnection($"Data Source={_dbPath}"); - await connection.OpenAsync(); + await connection.OpenAsync(TestContext.Current.CancellationToken); using var cmd = connection.CreateCommand(); cmd.CommandText = "SELECT MAX(version) FROM schema_version"; - var version = Convert.ToInt32(await cmd.ExecuteScalarAsync()); + var version = Convert.ToInt32(await cmd.ExecuteScalarAsync(TestContext.Current.CancellationToken)); Assert.Equal(DuckDbInitializer.CurrentSchemaVersion, version); } @@ -147,12 +147,12 @@ public async Task InitializeAsync_CreatesIndexes() await initializer.InitializeAsync(); using var connection = new DuckDBConnection($"Data Source={_dbPath}"); - await connection.OpenAsync(); + await connection.OpenAsync(TestContext.Current.CancellationToken); /* Verify at least some indexes exist by checking duckdb_indexes */ using var cmd = connection.CreateCommand(); cmd.CommandText = "SELECT COUNT(*) FROM duckdb_indexes()"; - var indexCount = Convert.ToInt32(await cmd.ExecuteScalarAsync()); + var indexCount = Convert.ToInt32(await cmd.ExecuteScalarAsync(TestContext.Current.CancellationToken)); /* We create 18 indexes */ Assert.True(indexCount >= 18, $"Expected >= 18 indexes, found {indexCount}"); diff --git a/Lite.Tests/Lite.Tests.csproj b/Lite.Tests/Lite.Tests.csproj index 65bf423b..86268874 100644 --- a/Lite.Tests/Lite.Tests.csproj +++ b/Lite.Tests/Lite.Tests.csproj @@ -1,4 +1,4 @@ - + net8.0-windows enable @@ -9,9 +9,12 @@ - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + +