--- 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.