[mono/mono] 78852142: Use more detailled assert messages in some, randomly failing, Timer unit tests (to help track #14305)
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <000001417add347c-d87e78a9-67ac-476c-8165-4d43a51bbcd4-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/3e745070dbcd...7885214216f3
Commit: 7885214216f3d7e7160c93d85b0be29f7f955d21
Author: Sebastien Pouliot <[email protected]> (spouliot)
Date: 2013-10-02 20:28:12 GMT
URL: https://github.com/mono/mono/commit/7885214216f3d7e7160c93d85b0be29f7f955d21
Use more detailled assert messages in some, randomly failing, Timer unit tests (to help track #14305)
Changed paths:
M mcs/class/corlib/Test/System.Threading/TimerTest.cs
Modified: mcs/class/corlib/Test/System.Threading/TimerTest.cs
===================================================================
@@ -60,11 +60,11 @@ public void TestChange ()
Timer t = new Timer (new TimerCallback (Callback), bucket, 10, 10);
Thread.Sleep (500);
int c = bucket.count;
- Assert.IsTrue(c > 20, "#1");
+ Assert.IsTrue (c > 20, "#1 " + c.ToString ());
t.Change (100, 100);
c = bucket.count;
Thread.Sleep (500);
- Assert.IsTrue(bucket.count <= c + 20, "#2");
+ Assert.IsTrue (bucket.count <= c + 20, "#2 " + c.ToString ());
t.Dispose ();
}
@@ -193,8 +193,7 @@ public void TestDelayZeroPeriodZero()
Thread.Sleep(100);
t.Change (int.MaxValue, Timeout.Infinite);
// since period is 0 the callback should happen once (bug #340212)
- Assert.IsTrue(b.count == 1);
-
+ Assert.AreEqual (1, b.count, "only once");
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches