@@ -83,15 +83,15 @@ public void TestConnection()
8383 }
8484
8585 [ Fact ]
86- public void TestSimpleQuery ( )
86+ public async Task TestSimpleQuery ( )
8787 {
8888 using var stmt = _connection . CreateStatement ( ) ;
8989 stmt . SqlQuery = "SELECT 1 AS x, 'hello' AS greeting" ;
9090
9191 var result = stmt . ExecuteQuery ( ) ;
9292 Assert . NotNull ( result . Stream ) ;
9393
94- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
94+ var batch = await result . Stream . ReadNextRecordBatchAsync ( ) ;
9595 Assert . NotNull ( batch ) ;
9696 Assert . Equal ( 1 , batch . Length ) ;
9797 Assert . Equal ( 2 , batch . ColumnCount ) ;
@@ -108,16 +108,17 @@ public void TestSimpleQuery()
108108 }
109109
110110 [ Fact ]
111- public void TestQueryWithExpressions ( )
111+ public async Task TestQueryWithExpressions ( )
112112 {
113113 using var stmt = _connection . CreateStatement ( ) ;
114114 stmt . SqlQuery = "SELECT 2 + 2 AS sum, UPPER('hello') AS upper_greeting" ;
115115
116116 var result = stmt . ExecuteQuery ( ) ;
117- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
117+ Assert . NotNull ( result . Stream ) ;
118+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
118119
119120 Assert . NotNull ( batch ) ;
120- Assert . Equal ( 1 , batch . Length ) ;
121+ Assert . Equal ( 1 , batch ! . Length ) ;
121122 }
122123
123124 [ Fact ]
@@ -133,7 +134,7 @@ public void TestSystemTables()
133134 // === DML Tests ===
134135
135136 [ Fact ]
136- public void TestInsertAndQuery ( )
137+ public async Task TestInsertAndQuery ( )
137138 {
138139 var table = GetCleanTable ( ) ;
139140
@@ -154,10 +155,11 @@ public void TestInsertAndQuery()
154155 using var queryStmt = _connection . CreateStatement ( ) ;
155156 queryStmt . SqlQuery = $ "SELECT * FROM { table } ORDER BY _id";
156157 var result = queryStmt . ExecuteQuery ( ) ;
157- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
158+ Assert . NotNull ( result . Stream ) ;
159+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
158160
159161 Assert . NotNull ( batch ) ;
160- Assert . Equal ( 3 , batch . Length ) ;
162+ Assert . Equal ( 3 , batch ! . Length ) ;
161163 }
162164 finally
163165 {
@@ -166,7 +168,7 @@ public void TestInsertAndQuery()
166168 }
167169
168170 [ Fact ]
169- public void TestUpdate ( )
171+ public async Task TestUpdate ( )
170172 {
171173 var table = GetCleanTable ( ) ;
172174
@@ -190,10 +192,11 @@ public void TestUpdate()
190192 using var queryStmt = _connection . CreateStatement ( ) ;
191193 queryStmt . SqlQuery = $ "SELECT price FROM { table } WHERE _id = 1";
192194 var result = queryStmt . ExecuteQuery ( ) ;
193- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
195+ Assert . NotNull ( result . Stream ) ;
196+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
194197
195198 Assert . NotNull ( batch ) ;
196- Assert . Equal ( 1 , batch . Length ) ;
199+ Assert . Equal ( 1 , batch ! . Length ) ;
197200 }
198201 finally
199202 {
@@ -202,7 +205,7 @@ public void TestUpdate()
202205 }
203206
204207 [ Fact ]
205- public void TestDelete ( )
208+ public async Task TestDelete ( )
206209 {
207210 var table = GetCleanTable ( ) ;
208211
@@ -226,10 +229,11 @@ public void TestDelete()
226229 using var queryStmt = _connection . CreateStatement ( ) ;
227230 queryStmt . SqlQuery = $ "SELECT * FROM { table } ";
228231 var result = queryStmt . ExecuteQuery ( ) ;
229- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
232+ Assert . NotNull ( result . Stream ) ;
233+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
230234
231235 Assert . NotNull ( batch ) ;
232- Assert . Equal ( 1 , batch . Length ) ;
236+ Assert . Equal ( 1 , batch ! . Length ) ;
233237 }
234238 finally
235239 {
@@ -238,7 +242,7 @@ public void TestDelete()
238242 }
239243
240244 [ Fact ]
241- public void TestHistoricalQuery ( )
245+ public async Task TestHistoricalQuery ( )
242246 {
243247 var table = GetCleanTable ( ) ;
244248
@@ -262,11 +266,12 @@ public void TestHistoricalQuery()
262266 using var queryStmt = _connection . CreateStatement ( ) ;
263267 queryStmt . SqlQuery = $ "SELECT *, _valid_from, _valid_to FROM { table } FOR ALL VALID_TIME ORDER BY _id, _valid_from";
264268 var result = queryStmt . ExecuteQuery ( ) ;
265- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
269+ Assert . NotNull ( result . Stream ) ;
270+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
266271
267272 Assert . NotNull ( batch ) ;
268273 // Should have 2 versions
269- Assert . Equal ( 2 , batch . Length ) ;
274+ Assert . Equal ( 2 , batch ! . Length ) ;
270275 }
271276 finally
272277 {
@@ -275,7 +280,7 @@ public void TestHistoricalQuery()
275280 }
276281
277282 [ Fact ]
278- public void TestErase ( )
283+ public async Task TestErase ( )
279284 {
280285 var table = GetCleanTable ( ) ;
281286
@@ -306,11 +311,12 @@ public void TestErase()
306311 using var queryStmt = _connection . CreateStatement ( ) ;
307312 queryStmt . SqlQuery = $ "SELECT * FROM { table } FOR ALL VALID_TIME ORDER BY _id";
308313 var result = queryStmt . ExecuteQuery ( ) ;
309- var batch = result . Stream . ReadNextRecordBatchAsync ( ) . Result ;
314+ Assert . NotNull ( result . Stream ) ;
315+ var batch = await result . Stream ! . ReadNextRecordBatchAsync ( ) ;
310316
311317 Assert . NotNull ( batch ) ;
312318 // Only record 2 should remain
313- Assert . Equal ( 1 , batch . Length ) ;
319+ Assert . Equal ( 1 , batch ! . Length ) ;
314320 }
315321 finally
316322 {
0 commit comments