@@ -72,13 +72,13 @@ public async Task InitializeAsync_CreatesAllTables()
7272 } ;
7373
7474 using var connection = new DuckDBConnection ( $ "Data Source={ _dbPath } ") ;
75- await connection . OpenAsync ( ) ;
75+ await connection . OpenAsync ( TestContext . Current . CancellationToken ) ;
7676
7777 foreach ( var table in expectedTables )
7878 {
7979 using var cmd = connection . CreateCommand ( ) ;
8080 cmd . CommandText = $ "SELECT COUNT(*) FROM information_schema.tables WHERE table_name = '{ table } '";
81- var count = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( ) ) ;
81+ var count = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( TestContext . Current . CancellationToken ) ) ;
8282 Assert . True ( count == 1 , $ "Table '{ table } ' should exist but was not found") ;
8383 }
8484 }
@@ -90,11 +90,11 @@ public async Task InitializeAsync_SetsCorrectSchemaVersion()
9090 await initializer . InitializeAsync ( ) ;
9191
9292 using var connection = new DuckDBConnection ( $ "Data Source={ _dbPath } ") ;
93- await connection . OpenAsync ( ) ;
93+ await connection . OpenAsync ( TestContext . Current . CancellationToken ) ;
9494
9595 using var cmd = connection . CreateCommand ( ) ;
9696 cmd . CommandText = "SELECT MAX(version) FROM schema_version" ;
97- var version = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( ) ) ;
97+ var version = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( TestContext . Current . CancellationToken ) ) ;
9898
9999 Assert . Equal ( DuckDbInitializer . CurrentSchemaVersion , version ) ;
100100 }
@@ -109,11 +109,11 @@ public async Task InitializeAsync_IsIdempotent()
109109 await initializer . InitializeAsync ( ) ;
110110
111111 using var connection = new DuckDBConnection ( $ "Data Source={ _dbPath } ") ;
112- await connection . OpenAsync ( ) ;
112+ await connection . OpenAsync ( TestContext . Current . CancellationToken ) ;
113113
114114 using var cmd = connection . CreateCommand ( ) ;
115115 cmd . CommandText = "SELECT MAX(version) FROM schema_version" ;
116- var version = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( ) ) ;
116+ var version = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( TestContext . Current . CancellationToken ) ) ;
117117
118118 Assert . Equal ( DuckDbInitializer . CurrentSchemaVersion , version ) ;
119119 }
@@ -147,12 +147,12 @@ public async Task InitializeAsync_CreatesIndexes()
147147 await initializer . InitializeAsync ( ) ;
148148
149149 using var connection = new DuckDBConnection ( $ "Data Source={ _dbPath } ") ;
150- await connection . OpenAsync ( ) ;
150+ await connection . OpenAsync ( TestContext . Current . CancellationToken ) ;
151151
152152 /* Verify at least some indexes exist by checking duckdb_indexes */
153153 using var cmd = connection . CreateCommand ( ) ;
154154 cmd . CommandText = "SELECT COUNT(*) FROM duckdb_indexes()" ;
155- var indexCount = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( ) ) ;
155+ var indexCount = Convert . ToInt32 ( await cmd . ExecuteScalarAsync ( TestContext . Current . CancellationToken ) ) ;
156156
157157 /* We create 18 indexes */
158158 Assert . True ( indexCount >= 18 , $ "Expected >= 18 indexes, found { indexCount } ") ;
0 commit comments