From 4fa760a1ed24ad2e6fba6dca51c5cf7dc7436719 Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Tue, 12 Nov 2024 09:13:29 +0000 Subject: [PATCH] 8343936: Adjust timeout in test javax/management/monitor/DerivedGaugeMonitorTest.java Reviewed-by: dfuchs --- test/jdk/ProblemList.txt | 2 -- .../management/monitor/DerivedGaugeMonitorTest.java | 9 +++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 3afcf1a32c9..54426795c5e 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -557,8 +557,6 @@ sun/management/jdp/JdpOffTest.java 8308807 aix-ppc6 javax/management/MBeanServer/OldMBeanServerTest.java 8030957 aix-all -javax/management/monitor/DerivedGaugeMonitorTest.java 8042211 generic-all - javax/management/remote/mandatory/connection/BrokenConnectionTest.java 8262312 linux-all ############################################################################ diff --git a/test/jdk/javax/management/monitor/DerivedGaugeMonitorTest.java b/test/jdk/javax/management/monitor/DerivedGaugeMonitorTest.java index 36b9dd40b50..1452de5c3ce 100644 --- a/test/jdk/javax/management/monitor/DerivedGaugeMonitorTest.java +++ b/test/jdk/javax/management/monitor/DerivedGaugeMonitorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024, 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 @@ -27,6 +27,8 @@ * @summary Test that the initial derived gauge is (Integer)0 * @author Daniel Fuchs * + * @library /test/lib + * * @run clean DerivedGaugeMonitorTest * @run build DerivedGaugeMonitorTest * @run main DerivedGaugeMonitorTest @@ -40,9 +42,12 @@ import javax.management.MBeanServerFactory; import javax.management.ObjectName; import javax.management.monitor.CounterMonitor; import javax.management.monitor.GaugeMonitor; +import jdk.test.lib.Utils; public class DerivedGaugeMonitorTest { + public static final int WAIT_TIME = 1000; + public static interface Things { public long getALong(); public int getAnInt(); @@ -239,7 +244,7 @@ public class DerivedGaugeMonitorTest { mon1.setGranularityPeriod(5); mon2.setGranularityPeriod(5); - my.cdl.await(1000, TimeUnit.MILLISECONDS); + my.cdl.await(Utils.adjustTimeout(WAIT_TIME), TimeUnit.MILLISECONDS); if (my.cdl.getCount() > 0) throw new Exception(attr+": Count down not reached!");