Merge pull request #1426 from ignacionr/webclient-delay-file-creation
[mono.git] / mcs / class / corlib / Test / System.Threading / TimerTest.cs
index dc6d4e50dac2c0961c4ee17f1878b5efabd2aed1..ee60eb53aa23b42e028e1c2d69ca64e41bb92602 100644 (file)
@@ -60,11 +60,11 @@ namespace MonoTests.System.Threading {
                        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,12 +193,11 @@ namespace MonoTests.System.Threading {
                        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");
                }
 
-#if !MONOTOUCH
                [Test]
+               [Ignore ()]
                public void TestDisposeOnCallback ()
                {
                        // this test is bad, as the provided `state` (t1) is null and will throw an NRE inside the callback
@@ -215,7 +214,6 @@ namespace MonoTests.System.Threading {
                {
                        ((Timer) foo).Dispose ();
                }
-#endif
 
                private void Callback (object foo)
                {