test(grpc-data): A2 review N5 — the waiter test counts condition-queue waits only (red on revert: 19 vs ≤ 1)
This commit is contained in:
+2
-2
@@ -237,13 +237,13 @@ internal sealed partial class DataSubscriptionSession
|
||||
|
||||
private Task<bool> StartWait(ChannelReader<PendingDelivery> reader, CancellationToken token)
|
||||
{
|
||||
Interlocked.Increment(ref _conditionWaitsStarted);
|
||||
if (!ReferenceEquals(reader, _outbound.Reader)) Interlocked.Increment(ref _conditionWaitsStarted);
|
||||
return reader.WaitToReadAsync(token).AsTask();
|
||||
}
|
||||
|
||||
private int _conditionWaitsStarted;
|
||||
|
||||
/// <summary>Test seam (N5): how many channel waits the delivery loop has registered.</summary>
|
||||
/// <summary>Test seam (N5): how many waits on the CONDITION queue the delivery loop has registered.</summary>
|
||||
internal int ConditionWaitsStartedForTests => Volatile.Read(ref _conditionWaitsStarted);
|
||||
|
||||
/// <summary>Test seam: the stream has processed its Open.</summary>
|
||||
|
||||
Reference in New Issue
Block a user