test/jdk/com/sun/jdi/SimulResumerTest.java
changeset 54127 e6a1c4e28294
parent 47216 71c04702a3d5
child 59021 cfc7bb9a5a92
equal deleted inserted replaced
54126:478f1483c511 54127:e6a1c4e28294
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   208                 if (thr.status() < 0) {
   208                 if (thr.status() < 0) {
   209                     failure("failure: status < 0");
   209                     failure("failure: status < 0");
   210                 }
   210                 }
   211 
   211 
   212             } catch (IncompatibleThreadStateException ee) {
   212             } catch (IncompatibleThreadStateException ee) {
   213                 // ignore
   213                 // ignore checks if thread was not suspended
       
   214             } catch (ObjectCollectedException ee) {
       
   215                 // ignore ownedMonitors failure
   214             } catch (VMDisconnectedException ee) {
   216             } catch (VMDisconnectedException ee) {
   215                 // This is how we stop.  The debuggee runs to completion
   217                 // This is how we stop.  The debuggee runs to completion
   216                 // and we get this exception.
   218                 // and we get this exception.
   217                 throw ee;
   219                 throw ee;
   218             } catch (Exception ee) {
   220             } catch (Exception ee) {
   247          */
   249          */
   248         resumerThread = new Thread("test resumer") {
   250         resumerThread = new Thread("test resumer") {
   249                 public void run() {
   251                 public void run() {
   250                     while (true) {
   252                     while (true) {
   251                         iters++;
   253                         iters++;
   252                         System.out.println("bkpts = " + bkpts + ", iters = " + iters);
   254                         // System.out.println("bkpts = " + bkpts + ", iters = " + iters);
   253                         try {
   255                         try {
   254                             Thread.sleep(waitTime);
   256                             Thread.sleep(waitTime);
   255                             check(debuggeeThread1);
   257                             check(debuggeeThread1);
   256                             check(debuggeeThread2);
   258                             check(debuggeeThread2);
   257                         } catch (InterruptedException ee) {
   259                         } catch (InterruptedException ee) {