Skip to content

Commit 5fdaafb

Browse files
committed
8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java
Reviewed-by: rrich Backport-of: 4fa760a1ed24ad2e6fba6dca51c5cf7dc7436719
1 parent d0a02d0 commit 5fdaafb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,6 @@ java/lang/instrument/RetransformBigClass.sh 8065756 generic-
526526
java/lang/management/MemoryMXBean/Pending.java 8158837 generic-all
527527
java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all
528528

529-
javax/management/monitor/DerivedGaugeMonitorTest.java 8042211 generic-all
530-
531529
############################################################################
532530

533531
# jdk_io

test/jdk/javax/management/monitor/DerivedGaugeMonitorTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
2727
* @summary Test that the initial derived gauge is (Integer)0
2828
* @author Daniel Fuchs
2929
*
30+
* @library /test/lib
31+
*
3032
* @run clean DerivedGaugeMonitorTest
3133
* @run build DerivedGaugeMonitorTest
3234
* @run main DerivedGaugeMonitorTest
@@ -40,9 +42,12 @@
4042
import javax.management.ObjectName;
4143
import javax.management.monitor.CounterMonitor;
4244
import javax.management.monitor.GaugeMonitor;
45+
import jdk.test.lib.Utils;
4346

4447
public class DerivedGaugeMonitorTest {
4548

49+
public static final int WAIT_TIME = 1000;
50+
4651
public static interface Things {
4752
public long getALong();
4853
public int getAnInt();
@@ -239,7 +244,7 @@ public static void test(String attr) throws Exception {
239244
mon1.setGranularityPeriod(5);
240245
mon2.setGranularityPeriod(5);
241246

242-
my.cdl.await(1000, TimeUnit.MILLISECONDS);
247+
my.cdl.await(Utils.adjustTimeout(WAIT_TIME), TimeUnit.MILLISECONDS);
243248
if (my.cdl.getCount() > 0)
244249
throw new Exception(attr+": Count down not reached!");
245250

0 commit comments

Comments
 (0)