Skip to content

Commit cf70fdc

Browse files
Inspection fixes.
1 parent 913b178 commit cf70fdc

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Open.ChannelExtensions.Tests/AssumptionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static async Task WaitCancellation()
1010
{
1111
CancellationToken token = tokenSource.Token;
1212

13-
var t = channel.Reader.WaitToReadAsync(token).ConfigureAwait(false);
13+
var t = channel.Reader.WaitToReadAsync(token);
1414
tokenSource.Cancel();
1515

1616
// NOTE: a cancelled WaitToReadAsync will throw.
@@ -26,7 +26,7 @@ public static async Task WaitCancellation()
2626
tokenSource.Cancel();
2727

2828
// NOTE: a cancelled WhenAny will not throw!
29-
var result = await Task.WhenAny(t1.AsTask(), t2.AsTask()).ConfigureAwait(false);
29+
var result = await Task.WhenAny(t1.AsTask(), t2.AsTask());
3030
Assert.True(result.IsCanceled);
3131
}
3232
}

Open.ChannelExtensions.Tests/BatchTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public static async Task ReadBatchWithTimeoutEnumerableBakedIn()
361361
Debug.WriteLine("First batch received: " + string.Join(',', batch.Select(item => item)));
362362
break;
363363
case 1:
364-
Assert.Equal(1, batch.Count);
364+
Assert.Single(batch);
365365
Assert.Equal(3, batch[0]);
366366
Debug.WriteLine("Second batch received: " + string.Join(',', batch.Select(item => item)));
367367
break;

Open.ChannelExtensions.Tests/SpecialTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ public void PossibleSourceLoadingIssue()
2121

2222
queue.CompleteAdding();
2323

24+
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
2425
processingTask.Wait();
26+
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
2527

2628
Assert.Equal(expectedCount, count_);
2729

0 commit comments

Comments
 (0)