8221472: Fix HandshakeSuspendExitTest
authorrehn
Tue, 26 Mar 2019 14:49:54 +0100
changeset 54282 6ddb9e3f1654
parent 54281 ca554363aed3
child 54283 e61065c08924
8221472: Fix HandshakeSuspendExitTest Reviewed-by: dcubed, redestad
test/hotspot/jtreg/runtime/handshake/HandshakeSuspendExitTest.java
--- a/test/hotspot/jtreg/runtime/handshake/HandshakeSuspendExitTest.java	Tue Mar 26 21:33:47 2019 +0800
+++ b/test/hotspot/jtreg/runtime/handshake/HandshakeSuspendExitTest.java	Tue Mar 26 14:49:54 2019 +0100
@@ -42,9 +42,9 @@
         while (!_exit_now) {
             // Leave last 2 threads running.
             for (int i = 0; i < _suspend_threads.length - 2; i++) {
-                if (Thread.currentThread() != thr) {
-                    thr.suspend();
-                    thr.resume();
+                if (Thread.currentThread() != _suspend_threads[i]) {
+                    _suspend_threads[i].suspend();
+                    _suspend_threads[i].resume();
                 }
             }
         }