File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests/Sys Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,12 @@ public async Task QuerySessionPidTest()
1111
1212 await using var connection = await CreateOpenConnectionAsync ( ) ;
1313 var dbCommand = connection . CreateCommand ( ) ;
14- dbCommand . CommandText = "SELECT ClientPID FROM `.sys/query_sessions` WHERE ClientPID = @pid; LIMIT 1; " ;
14+ dbCommand . CommandText = "SELECT ClientPID FROM `.sys/query_sessions` WHERE ClientPID = @pid;" ;
1515 dbCommand . Parameters . Add ( new YdbParameter ( "pid" , expectedPid ) ) ;
1616
1717 await dbCommand . ExecuteNonQueryAsync ( ) ;
18- await using var reader = await dbCommand . ExecuteReaderAsync ( ) ;
18+ var actualPid = await dbCommand . ExecuteScalarAsync ( ) ;
1919
20- Assert . True ( reader . HasRows ) ;
21- Assert . True ( await reader . ReadAsync ( ) ) ;
22- Assert . Equal ( expectedPid , reader . GetString ( 0 ) ) ;
23- Assert . False ( await reader . ReadAsync ( ) ) ;
20+ Assert . Equal ( expectedPid , actualPid ) ;
2421 }
2522}
You can’t perform that action at this time.
0 commit comments