[corlib] Increase timeout for MonoTests.System.Runtime.Remoting.TestSynchronizationRe...
[mono.git] / mcs / class / corlib / Test / System.Runtime.Remoting / SynchronizationAttributeTest.cs
index 7596f3fd8bd53e905af9346ae6d622ec6ce9f57d..8693bdfbe5ec8b6cb1a76bf68ecbe5b91befd154 100644 (file)
@@ -220,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);
@@ -331,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 ();