[corlib] Increase timeout for MonoTests.System.Runtime.Remoting.TestSynchronizationRe...
[mono.git] / mcs / class / corlib / Test / System.Runtime.Remoting / SynchronizationAttributeTest.cs
index 6d7c1302588cca679ccc7a357ffe348ae1184973..8693bdfbe5ec8b6cb1a76bf68ecbe5b91befd154 100644 (file)
@@ -136,6 +136,7 @@ namespace MonoTests.System.Runtime.Remoting
        }
 
        [TestFixture]
+       [Category ("MobileNotWorking")] // Bug #10267
        public class SynchronizationAttributeTest
        {
                SincroRequiresNew sincob = new SincroRequiresNew ();
@@ -219,6 +220,7 @@ namespace MonoTests.System.Runtime.Remoting
                public void TestLocked1 ()
                {
                        sincob.Lock (false);
+
                        Thread tr = new Thread (new ThreadStart (FirstSyncThread));
                        tr.Start ();
                        Thread.Sleep (200);
@@ -330,6 +332,21 @@ namespace MonoTests.System.Runtime.Remoting
                        Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
                }
 
+               [Test]
+               public void TestSynchronizationReleasedOnMultipleAcquire ()
+               {
+
+                       otResult = notreentrant.TestCallback ();
+                   
+                       Thread tr = new Thread (new ThreadStart (CallbackThread));
+                       tr.Start();
+                       
+                       bool terminated = tr.Join(10000);
+                       Assert.IsTrue(terminated, "Thread didn't get lock of context bound object.");
+                       
+                       Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
+               }
+
                void CallbackThread ()
                {
                        otResult = notreentrant.TestCallback ();
@@ -337,6 +354,7 @@ namespace MonoTests.System.Runtime.Remoting
                
                [Test]
                [Category("NotDotNet")]
+               [Category ("MobileNotWorking")]
                public void TestMonitorWait ()
                {
                        Thread tr = new Thread (new ThreadStart (DoMonitorPulse));