src/JavaMonitorsTests.st
branchjk_new_structure
changeset 1477 cc9bd91382a2
parent 1472 18de85f968bd
child 1515 f4ebf5cf3f89
--- a/src/JavaMonitorsTests.st	Fri Apr 13 00:36:32 2012 +0000
+++ b/src/JavaMonitorsTests.st	Fri Apr 13 10:03:19 2012 +0000
@@ -403,7 +403,7 @@
         caught := true
     ].
     self assert: caught.
-    self assert: (javaTests instVarNamed: #token) == 9.
+    self assert: (javaTests instVarNamed: #token) == 1003.
 
     self assert: (JavaVM enteredMonitorsOfProcess: thisProcess) isEmptyOrNil.
 
@@ -411,18 +411,13 @@
 !
 
 test_releasing_03
-    "This tests call Java code in following setup:
-        - a smalltal method (this one) calls 
-        - a GroovyCompiler to compile a class, which in turn calls
-        - bunch of java methods
-
-     When first GroovyCompiler returns, all monitors should be released        
+    "Checks for bugs in monitor handling, there used to be a bug
+     that causes monitors not be entered/exited properly. This should
+     catch this bug if it reappears
     "
-    OperatingSystem getLoginName ~= 'jv' ifTrue:[ ^ self ].
-
     self assert: (JavaVM enteredMonitorsOfProcess: thisProcess) isEmptyOrNil.
 
-    GroovyCompiler compile: 'class Foo {}'.
+    GroovyEvaluator new evaluate: '1'.
 
     self assert: (JavaVM enteredMonitorsOfProcess: thisProcess) isEmptyOrNil.