mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 23:01:44 +01:00
fixed cancelation race in test case InterceptClientSideOverrideCanceledCall
This commit is contained in:
parent
044042dbdd
commit
3924fa0080
@ -301,10 +301,10 @@ namespace Capnp.Net.Runtime.Tests
|
|||||||
client.WhenConnected.Wait();
|
client.WhenConnected.Wait();
|
||||||
|
|
||||||
var counters = new Counters();
|
var counters = new Counters();
|
||||||
server.Main = new TestInterfaceImpl(counters);
|
server.Main = new TestMoreStuffImpl(counters);
|
||||||
using (var main = policy.Attach(client.GetMain<ITestInterface>()))
|
using (var main = policy.Attach(client.GetMain<ITestMoreStuff>()))
|
||||||
{
|
{
|
||||||
var request1 = main.Foo(321, false, new CancellationToken(true));
|
var request1 = main.NeverReturn(new TestInterfaceImpl(new Counters()), new CancellationToken(true));
|
||||||
Assert.IsTrue(policy.Calls.TryReceive(out var cc));
|
Assert.IsTrue(policy.Calls.TryReceive(out var cc));
|
||||||
Assert.IsFalse(request1.IsCompleted);
|
Assert.IsFalse(request1.IsCompleted);
|
||||||
Assert.IsTrue(cc.CancelFromAlice.IsCancellationRequested);
|
Assert.IsTrue(cc.CancelFromAlice.IsCancellationRequested);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user