File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,10 @@ public void ExecuteDbDataReader_WhenPreviousIsNotClosed_ThrowException()
280280
281281 Assert . Equal ( "A command is already in progress: SELECT 1; SELECT 1;" ,
282282 Assert . Throws < YdbOperationInProgressException > ( ( ) => dbCommand . ExecuteReader ( ) ) . Message ) ;
283+ Assert . True ( ydbDataReader . NextResult ( ) ) ;
284+ Assert . True ( ydbDataReader . NextResult ( ) ) ;
285+ Assert . False ( ydbDataReader . NextResult ( ) ) ;
286+
283287 ydbDataReader . Close ( ) ;
284288 Assert . True ( ydbDataReader . IsClosed ) ;
285289 }
@@ -331,6 +335,7 @@ public void GetChars_WhenSelectText_MoveCharsToBuffer()
331335 Assert . Equal ( checkBuffer , bufferChars ) ;
332336
333337 Assert . Equal ( 'a' , ydbDataReader . GetChar ( 0 ) ) ;
338+ Assert . False ( ydbDataReader . Read ( ) ) ;
334339 }
335340
336341 [ Fact ]
@@ -377,6 +382,7 @@ public void GetBytes_WhenSelectBytes_MoveBytesToBuffer()
377382 checkBuffer [ 6 ] = ( byte ) 'b' ;
378383 checkBuffer [ 7 ] = ( byte ) 'a' ;
379384 Assert . Equal ( checkBuffer , bufferChars ) ;
385+ Assert . False ( ydbDataReader . Read ( ) ) ;
380386 }
381387
382388 [ Fact ]
Original file line number Diff line number Diff line change @@ -137,6 +137,11 @@ public void CommitAndRollback_WhenStreamIsOpened_ThrowException()
137137 Assert . Equal ( "A command is already in progress: SELECT 1; SELECT 2; SELECT 3" ,
138138 Assert . Throws < YdbOperationInProgressException > ( ( ) => ydbTransaction . Rollback ( ) ) . Message ) ;
139139
140+ Assert . True ( dbDataReader . NextResult ( ) ) ;
141+ Assert . True ( dbDataReader . NextResult ( ) ) ;
142+ Assert . True ( dbDataReader . NextResult ( ) ) ;
143+ Assert . False ( dbDataReader . NextResult ( ) ) ;
144+
140145 dbDataReader . Close ( ) ; // Close stream
141146 ydbTransaction . Commit ( ) ;
142147 Assert . Equal ( "This YdbTransaction has completed; it is no longer usable" ,
You can’t perform that action at this time.
0 commit comments