diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-07-08 17:36:11 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-07-08 17:36:11 +0200 |
commit | 2431b7cc42837e84e957002cd61bf754105bfc1c (patch) | |
tree | f45cac5bcf8829fd023ea883becda400953b89ec /csharp/test | |
parent | Added Makefile.mk for Slice/parser test, fixes #346 (diff) | |
download | ice-2431b7cc42837e84e957002cd61bf754105bfc1c.tar.bz2 ice-2431b7cc42837e84e957002cd61bf754105bfc1c.tar.xz ice-2431b7cc42837e84e957002cd61bf754105bfc1c.zip |
Fixed dispatcher test failure, fixes #167
Diffstat (limited to 'csharp/test')
-rw-r--r-- | csharp/test/Ice/dispatcher/AllTests.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/csharp/test/Ice/dispatcher/AllTests.cs b/csharp/test/Ice/dispatcher/AllTests.cs index ff9ee284ff3..7f032bd2d53 100644 --- a/csharp/test/Ice/dispatcher/AllTests.cs +++ b/csharp/test/Ice/dispatcher/AllTests.cs @@ -197,6 +197,9 @@ public class AllTests : Test.AllTests // Expect InvocationTimeoutException. // { + // The continuation might be (rarely) executed on the current thread if the setup of the + // continuation occurs after the invocation timeout. + var thread = Thread.CurrentThread; Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(20)); to.sleepAsync(500).ContinueWith( previous => @@ -209,7 +212,7 @@ public class AllTests : Test.AllTests catch(System.AggregateException ex) { test(ex.InnerException is Ice.InvocationTimeoutException); - test(Dispatcher.isDispatcherThread()); + test(Dispatcher.isDispatcherThread() || thread == Thread.CurrentThread); } }, TaskContinuationOptions.ExecuteSynchronously).Wait(); } |