Skip to content

Commit 4fa760a

Browse files
committed
8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java
Reviewed-by: dfuchs
1 parent cbf4dd5 commit 4fa760a

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
@@ -557,8 +557,6 @@ sun/management/jdp/JdpOffTest.java 8308807 aix-ppc6
557557

558558
javax/management/MBeanServer/OldMBeanServerTest.java 8030957 aix-all
559559

560-
javax/management/monitor/DerivedGaugeMonitorTest.java 8042211 generic-all
561-
562560
javax/management/remote/mandatory/connection/BrokenConnectionTest.java 8262312 linux-all
563561

564562
############################################################################

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)