Skip to content

Commit 932af0d

Browse files
committed
Another fix for test sync
1 parent fb8ef4f commit 932af0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/KubernetesClient.Tests/ResourceEventDeltaBlockTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ public async Task DistributeWork(string description, ScheduledEvent<TestResource
115115
var sut = new ResourceEventDeltaBlock<int, TestResource>(x => x.Key, log: _log);
116116
var testScheduler = new TestScheduler();
117117
var results = new List<List<ResourceEvent<TestResource>>>();
118-
var actionBlock = new ActionBlock<List<ResourceEvent<TestResource>>>(deltas =>
118+
var actionBlock = new ActionBlock<List<ResourceEvent<TestResource>>>(async deltas =>
119119
{
120120
_log.LogTrace($"Worker called for {string.Join("", deltas)}");
121121
results.Add(deltas);
122-
Thread.Sleep(300);
123-
testScheduler.Sleep(300);
122+
await Task.Delay(300);
123+
//testScheduler.Sleep(300);
124124
}, new ExecutionDataflowBlockOptions() {BoundedCapacity = 1, MaxDegreeOfParallelism = 1});
125125
sut.LinkTo(actionBlock, new DataflowLinkOptions {PropagateCompletion = true});
126126

0 commit comments

Comments
 (0)