Commit 4c990714 authored by Marc Gravell's avatar Marc Gravell

remove the Sleep from PreserveOrder test

parent 1b5fa2b2
......@@ -146,7 +146,7 @@ public async Task TestManaulHeartbeat()
var after = muxer.OperationCount;
Assert.True(after >= before + 4);
Assert.True(after >= before + 4, $"after: {after}, before: {before}");
}
}
......@@ -355,7 +355,7 @@ public async Task TestAutomaticHeartbeat()
await Task.Delay(8000).ForAwait();
var after = innerMuxer.OperationCount;
Assert.True(after >= before + 4);
Assert.True(after >= before + 4, $"after: {after}, before: {before}");
}
}
finally
......
......@@ -20,7 +20,7 @@ public void Execute()
var channel = Me();
var received = new List<int>();
Log("Subscribing...");
const int COUNT = 100;
const int COUNT = 500;
sub.Subscribe(channel, (_, message) =>
{
lock (received)
......@@ -29,8 +29,6 @@ public void Execute()
if (received.Count == COUNT)
Monitor.PulseAll(received); // wake the test rig
}
Thread.Sleep(1); // you kinda need to be slow, otherwise
// the pool will end up doing everything on one thread
});
Log("");
Log("Sending (any order)...");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment