Fix a race in an sdb test
authorZoltan Varga <vargaz@gmail.com>
Wed, 12 Oct 2011 05:19:30 +0000 (07:19 +0200)
committerZoltan Varga <vargaz@gmail.com>
Wed, 12 Oct 2011 05:19:50 +0000 (07:19 +0200)
mcs/class/Mono.Debugger.Soft/Test/dtest.cs

index 382671183f141831371d0c1336b94d105d9ad48a..37098a5e81f17447b85ce8920fba2a400a18b6bd 100644 (file)
@@ -1935,16 +1935,16 @@ public class DebuggerTests
                        vm.Resume ();
                }
 
-               // Check that the invoke frames are no longer valid
-               AssertThrows<InvalidStackFrameException> (delegate {
-                               invoke_frame.GetThis ();
-                       });
-
                lock (wait) {
                        if (!finished)
                                Monitor.Wait (wait);
                }
 
+               // Check that the invoke frames are no longer valid
+               AssertThrows<InvalidStackFrameException> (delegate {
+                               invoke_frame.GetThis ();
+                       });
+
                // Check InvokeOptions.DisableBreakpoints flag
                o.InvokeMethod (e.Thread, m, null, InvokeOptions.DisableBreakpoints);
        }