src/TestletTestCaseProxy.st
branchjk_new_structure
changeset 1091 215f8fe6687b
parent 1090 0b9c332d367c
child 1152 040cba55a7d2
--- a/src/TestletTestCaseProxy.st	Sun Nov 06 17:07:27 2011 +0000
+++ b/src/TestletTestCaseProxy.st	Mon Nov 07 22:52:29 2011 +0000
@@ -226,29 +226,26 @@
     handlerBlock := [:ex | TestResult failure sunitSignalWith: ex description].
 
     self createHarness.
-    
-    [ JavaVM unimplementedNativeMethodSignal 
-        handle:
-            handlerBlock
-        do: [            
-            [   
+
+    [    
+        [ JavaVM unimplementedNativeMethodSignal 
+            handle:
+                handlerBlock
+            do: [            
                 self javaClass new 
                     perform: 'test(Lgnu/testlet/TestHarness;)V' sunitAsSymbol
                     with: harness
-            ] on: Object abortSignal do:[:abrt|
-                JavaVM releaseMonitorsOfProcess.
-                abrt reject.
-            ]
-       ].
-    ] on: JavaError do: [:ex | 
-        TestResult failure sunitSignalWith: ex description
-    ].
+            ].
+        ] on: JavaError do: handlerBlock
+    ] ensure:[
+        JavaVM releaseMonitorsOfProcess
+    ]
 
     "/((harness instVarNamed: 'passed') = 0 ) ifTrue: [ TestResult failure sunitSignalWith: 'Test failed' ].
 
     "Created: / 01-03-2011 / 14:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 29-05-2011 / 23:19:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 04-11-2011 / 22:22:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-11-2011 / 20:45:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TestletTestCaseProxy methodsFor:'private - Proxy interface'!