< prev index next >

test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java

Print this page
*** 22,19 ***
--- 22,33 ---
   */
  
  /*
   * @test id=default
   * @summary Test SuspendAllVirtualThreads/ResumeAllVirtualThreads
+  * @requires vm.debug != true
   * @library /test/lib
   * @compile SuspendResume2.java
   * @run driver jdk.test.lib.FileInstaller . .
   * @run main/othervm/native
   *      -Djdk.virtualThreadScheduler.maxPoolSize=1
   *      -agentlib:SuspendResume2
   *      SuspendResume2
   */
  
+ /*
+  * @test id=debug
+  * @requires vm.debug == true
+  * @library /test/lib
+  * @compile SuspendResume2.java
+  * @run driver jdk.test.lib.FileInstaller . .
+  * @run main/othervm/native
+  *      -Djdk.virtualThreadScheduler.maxPoolSize=1
+  *      -agentlib:SuspendResume2
+  *      -XX:-VerifyContinuations
+  *      SuspendResume2
+  */
+ 
  /*
   * @test id=no-vmcontinuations
   * @requires vm.continuations
   * @library /test/lib
   * @compile SuspendResume2.java

*** 146,11 ***
          int i = 0;
          int n = 1000;
          while (!shouldFinish) {
              if (n <= 0) {
                  n = 1000;
!                 SuspendResume2.sleep(1);
              }
              if (i > n) {
                  i = 0;
                  n = n - 1;
              }
--- 160,11 ---
          int i = 0;
          int n = 1000;
          while (!shouldFinish) {
              if (n <= 0) {
                  n = 1000;
!                 SuspendResume2.sleep(10);
              }
              if (i > n) {
                  i = 0;
                  n = n - 1;
              }

*** 160,11 ***
  
      // ensure thread is ready
      public void ensureReady() {
          try {
              while (!threadReady) {
!                 sleep(1);
              }
          } catch (InterruptedException e) {
              throw new RuntimeException("Interruption while preparing tested thread: \n\t" + e);
          }
      }
--- 174,11 ---
  
      // ensure thread is ready
      public void ensureReady() {
          try {
              while (!threadReady) {
!                 sleep(100);
              }
          } catch (InterruptedException e) {
              throw new RuntimeException("Interruption while preparing tested thread: \n\t" + e);
          }
      }
< prev index next >