mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 06:41:50 +01:00
made test more robust
This commit is contained in:
parent
f896acf06b
commit
044042dbdd
@ -310,8 +310,8 @@ namespace Capnp.Net.Runtime.Tests
|
||||
Assert.IsTrue(cc.CancelFromAlice.IsCancellationRequested);
|
||||
|
||||
cc.ForwardToBob();
|
||||
Assert.IsTrue(policy.Returns.ReceiveAsync().Wait(MediumNonDbgTimeout));
|
||||
Assert.IsTrue(cc.ReturnCanceled);
|
||||
Assert.IsTrue(policy.Returns.ReceiveAsync().Wait(MediumNonDbgTimeout), "must return");
|
||||
Assert.IsTrue(cc.ReturnCanceled, "must be canceled");
|
||||
cc.ReturnCanceled = false;
|
||||
cc.Exception = "Cancelled";
|
||||
|
||||
|
@ -432,6 +432,7 @@ namespace Capnp.Net.Runtime.Tests.GenImpls
|
||||
public virtual Task<string> Foo(uint i, bool j, CancellationToken cancellationToken)
|
||||
{
|
||||
Interlocked.Increment(ref _counters.CallCount);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
Assert.AreEqual(123u, i);
|
||||
Assert.IsTrue(j);
|
||||
return Task.FromResult("foo");
|
||||
|
Loading…
x
Reference in New Issue
Block a user