Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Ydb.Sdk/src/Ado/YdbCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellat
{
await using var dataReader = await ExecuteReaderAsync(cancellationToken);

while (await dataReader.ReadAsync(cancellationToken))
while (await dataReader.NextResultAsync(cancellationToken))
{
}

Expand All @@ -51,7 +51,7 @@ public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellat
? dataReader.IsDBNull(0) ? null : dataReader.GetValue(0)
: null;

while (await dataReader.ReadAsync(cancellationToken))
while (await dataReader.NextResultAsync(cancellationToken))
{
}

Expand Down
6 changes: 4 additions & 2 deletions src/Ydb.Sdk/tests/Topic/WriterUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public async Task Initialize_WhenFailWriteMessage_ShouldRetryInitializeAndReturn
Assert.Equal(PersistenceStatus.Written, (await writer.WriteAsync("abacaba")).Status);

// check attempt repeated!!!
_mockStream.Verify(stream => stream.Write(It.IsAny<FromClient>()), Times.Exactly(3));
_mockStream.Verify(stream => stream.Write(It.IsAny<FromClient>()),
Times.AtLeast(2)); // run processing ack may not be able to start on time
_mockStream.Verify(stream => stream.MoveNextAsync(), Times.Exactly(3));
_mockStream.Verify(stream => stream.Current, Times.Exactly(2));
}
Expand Down Expand Up @@ -178,7 +179,8 @@ public async Task Initialize_WhenFailMoveNextAsync_ShouldRetryInitializeAndRetur

// check attempt repeated!!!
_mockStream.Verify(stream => stream.Write(It.IsAny<FromClient>()), Times.Exactly(3));
_mockStream.Verify(stream => stream.MoveNextAsync(), Times.Exactly(4));
_mockStream.Verify(stream => stream.MoveNextAsync(),
Times.AtLeast(3)); // run processing ack may not be able to start on time
_mockStream.Verify(stream => stream.Current, Times.Exactly(2));
}

Expand Down
Loading