Skip to content

Commit

Permalink
Fix test cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Jan 25, 2025
1 parent 5e277b8 commit 5ed2adc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/NATS.Client.JetStream.Tests/ErrorHandlerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,16 @@ public async Task Ordered_consumer_consume_handling()

await Retry.Until("timed out", () => Volatile.Read(ref timeoutNotifications) > 0, timeout: TimeSpan.FromSeconds(30));
consumeCts.Cancel();
await consume;

Assert.True(Volatile.Read(ref timeoutNotifications) > 0);

try
{
await consume;
}
catch (OperationCanceledException)
{
}
}

[Fact]
Expand Down

0 comments on commit 5ed2adc

Please sign in to comment.