Skip to content

Commit 4364f42

Browse files
committed
Bug 37125872 - Build: Tangosol.Util.TimeoutTests.InterruptTest failure
[git-p4: depot-paths = "//dev/main.net/": change = 115609]
1 parent 4bd15b1 commit 4364f42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Coherence.Tests/Util/TimeoutTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ public void InterruptTest()
5757
Assert.IsTrue(ThreadTimeout.RemainingTimeoutMillis > 0);
5858
Assert.IsFalse(ThreadTimeout.IsTimedOut);
5959
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);
6065
// Assert.IsTrue(ThreadTimeout.IsTimedOut);
61-
Assert.AreEqual(0, ThreadTimeout.RemainingTimeoutMillis);
6266
try
6367
{
6468
// use Monitor.Wait() instead of Blocking.Wait() to show that

0 commit comments

Comments
 (0)