File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellat
3131 {
3232 await using var dataReader = await ExecuteReaderAsync ( cancellationToken ) ;
3333
34- while ( await dataReader . ReadAsync ( cancellationToken ) )
34+ while ( await dataReader . NextResultAsync ( cancellationToken ) )
3535 {
3636 }
3737
@@ -51,7 +51,7 @@ public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellat
5151 ? dataReader . IsDBNull ( 0 ) ? null : dataReader . GetValue ( 0 )
5252 : null ;
5353
54- while ( await dataReader . ReadAsync ( cancellationToken ) )
54+ while ( await dataReader . NextResultAsync ( cancellationToken ) )
5555 {
5656 }
5757
Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ public async Task Initialize_WhenFailWriteMessage_ShouldRetryInitializeAndReturn
130130 Assert . Equal ( PersistenceStatus . Written , ( await writer . WriteAsync ( "abacaba" ) ) . Status ) ;
131131
132132 // check attempt repeated!!!
133- _mockStream . Verify ( stream => stream . Write ( It . IsAny < FromClient > ( ) ) , Times . Exactly ( 3 ) ) ;
133+ _mockStream . Verify ( stream => stream . Write ( It . IsAny < FromClient > ( ) ) ,
134+ Times . AtLeast ( 2 ) ) ; // run processing ack may not be able to start on time
134135 _mockStream . Verify ( stream => stream . MoveNextAsync ( ) , Times . Exactly ( 3 ) ) ;
135136 _mockStream . Verify ( stream => stream . Current , Times . Exactly ( 2 ) ) ;
136137 }
@@ -178,7 +179,8 @@ public async Task Initialize_WhenFailMoveNextAsync_ShouldRetryInitializeAndRetur
178179
179180 // check attempt repeated!!!
180181 _mockStream . Verify ( stream => stream . Write ( It . IsAny < FromClient > ( ) ) , Times . Exactly ( 3 ) ) ;
181- _mockStream . Verify ( stream => stream . MoveNextAsync ( ) , Times . Exactly ( 4 ) ) ;
182+ _mockStream . Verify ( stream => stream . MoveNextAsync ( ) ,
183+ Times . AtLeast ( 3 ) ) ; // run processing ack may not be able to start on time
182184 _mockStream . Verify ( stream => stream . Current , Times . Exactly ( 2 ) ) ;
183185 }
184186
You can’t perform that action at this time.
0 commit comments