File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tests/Coherence.Tests/Util Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,12 @@ public void InterruptTest()
57
57
Assert . IsTrue ( ThreadTimeout . RemainingTimeoutMillis > 0 ) ;
58
58
Assert . IsFalse ( ThreadTimeout . IsTimedOut ) ;
59
59
Assert . IsFalse ( Blocking . Wait ( o , 1000 ) ) ;
60
+ // TODO: At this point, the thread should time out, and RemainingTimeoutMillis should be 0.
61
+ // Occasionally, this doesn't happen—probably due to .NET ticks being rounded
62
+ // to milliseconds, which causes a loss of precision — so RemainingTimeoutMillis
63
+ // ends up with the value 1.
64
+ Assert . GreaterOrEqual ( 1 , ThreadTimeout . RemainingTimeoutMillis ) ;
60
65
// Assert.IsTrue(ThreadTimeout.IsTimedOut);
61
- Assert . AreEqual ( 0 , ThreadTimeout . RemainingTimeoutMillis ) ;
62
66
try
63
67
{
64
68
// use Monitor.Wait() instead of Blocking.Wait() to show that
You can’t perform that action at this time.
0 commit comments