Skip to content
Merged
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
10 changes: 5 additions & 5 deletions tests/OpenCode.Sdk.Tests/Support/OwnedEventReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public async Task CompleteAsync_Should_Bound_Stalls_Reach_Removal_And_Attach_Lat
pending.SetException(readerFailure);
var report = owner.LateFailures;
await Assert.That(report).IsNotNull();
var observed = await report.WaitForFailureAsync(CancellationToken.None);
var observed = await report.WaitForFailureAsync(CancellationToken.None).WaitAsync(HangGuard.Bound);
await Assert.That(observed.Value).IsSameReferenceAs(readerFailure);
release.Set();
await report.WaitForAllAsync(CancellationToken.None);
await report.WaitForAllAsync(CancellationToken.None).WaitAsync(HangGuard.Bound);
// Late failure completion order is not part of this assertion's contract.
await Assert.That(attached.Select(entry => entry.Value)).IsEquivalentTo(new Exception[] { readerFailure, callbackFailure }, CollectionOrdering.Any);
// Late failure completion order is not part of this assertion's contract.
Expand All @@ -107,7 +107,7 @@ public async Task CompleteAsync_Should_Bound_Stalls_Reach_Removal_And_Attach_Lat
await scenario.DrainAsync(completing);
if (owner.LateFailures is { } report)
{
await report.WaitForAllAsync(CancellationToken.None);
await report.WaitForAllAsync(CancellationToken.None).WaitAsync(HangGuard.Bound);
}
}
}
Expand Down Expand Up @@ -193,7 +193,7 @@ public async Task CompleteAsync_Should_Observe_Late_Cooperative_Cancellation_Aft
await Assert.That(report).IsNotNull();

pending.SetCanceled(token);
await report.WaitForAllAsync(CancellationToken.None);
await report.WaitForAllAsync(CancellationToken.None).WaitAsync(HangGuard.Bound);

await Assert.That(report.Failures).IsEmpty();
}
Expand All @@ -203,7 +203,7 @@ public async Task CompleteAsync_Should_Observe_Late_Cooperative_Cancellation_Aft
await scenario.DrainAsync(completing);
if (owner.LateFailures is { } report)
{
await report.WaitForAllAsync(CancellationToken.None);
await report.WaitForAllAsync(CancellationToken.None).WaitAsync(HangGuard.Bound);
}
}
}
Expand Down
Loading