Skip to content

Commit 5f05a51

Browse files
dev: fix flap test (#234)
1 parent 6095807 commit 5f05a51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Ydb.Sdk/tests/Topic/WriterUnitTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,14 @@ public async Task Initialize_WhenInitResponseStatusIsRetryable_ShouldRetryInitia
254254

255255
// check attempt repeated!!!
256256
_mockStream.Verify(stream => stream.Write(It.IsAny<FromClient>()), Times.Exactly(3));
257-
_mockStream.Verify(stream => stream.MoveNextAsync(), Times.Exactly(4));
257+
_mockStream.Verify(stream => stream.MoveNextAsync(),
258+
Times.AtLeast(3)); // run processing ack may not be able to start on time
258259
_mockStream.Verify(stream => stream.Current, Times.Exactly(3));
259260
}
260261

261262
[Fact]
262-
public async Task Initialize_WhenInitResponseStatusIsRetryable_ThrowWriterExceptionOnWriteAsyncAndStopInitializing()
263+
public async Task
264+
Initialize_WhenInitResponseStatusIsNotRetryable_ThrowWriterExceptionOnWriteAsyncAndStopInitializing()
263265
{
264266
_mockStream.Setup(stream => stream.Write(It.IsAny<FromClient>()))
265267
.Returns(Task.CompletedTask);

0 commit comments

Comments
 (0)