8216386: vmTestbase/nsk/jvmti/PopFrame/popframe005/TestDescription.java fails
authoramenkov
Thu, 24 Jan 2019 11:10:13 -0800
changeset 53476 6c636747ec55
parent 53475 6130409b923e
child 53477 8f785877c008
8216386: vmTestbase/nsk/jvmti/PopFrame/popframe005/TestDescription.java fails Reviewed-by: jcbeyler, dtitov, sspitsyn
test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005.java	Thu Jan 24 10:57:31 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005.java	Thu Jan 24 11:10:13 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,8 @@
 
 package nsk.jvmti.PopFrame;
 
+import jdk.test.lib.Utils;
 import nsk.share.Consts;
-
 import nsk.share.Wicket;
 import java.io.PrintStream;
 
@@ -35,7 +35,7 @@
  * <li>no JVMTI events will be generated by the function <code>PopFrame()</code>
  */
 public class popframe005 {
-    static final int WAIT_TIME = 2000;
+    static final long WAIT_TIME = Utils.adjustTimeout(2000);
 
     static volatile int testedStep = 0; /* 0- action no yet started
                                            1- a frame is to be popped
@@ -144,7 +144,8 @@
         }
 
         try {
-            objWaiterThr1.join(WAIT_TIME);
+            // don't want to wait too much if timeout.factor is big
+            objWaiterThr1.join(Math.min(WAIT_TIME, 5000));
         } catch (InterruptedException e) {
             out.println("Joining the objWaiterThr1's thread: caught " + e);
             out.flush();