8175542: JMX: Not enough JDP packets received
Summary: Fixed test case wrongly reporting timeout failures.
Reviewed-by: dholmes, hb
Contributed-by: amit.sapre@oracle.com
--- a/test/jdk/ProblemList.txt Mon Jan 15 09:23:02 2018 -0800
+++ b/test/jdk/ProblemList.txt Tue Jan 16 12:38:21 2018 +0530
@@ -1,6 +1,6 @@
###########################################################################
#
-# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2018, 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
@@ -197,7 +197,6 @@
com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all
com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all
sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java 8174734 generic-all
-sun/management/jdp/JdpOffTest.java 8175542 generic-all
############################################################################
--- a/test/jdk/sun/management/jdp/JdpTestCase.java Mon Jan 15 09:23:02 2018 -0800
+++ b/test/jdk/sun/management/jdp/JdpTestCase.java Tue Jan 16 12:38:21 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -77,11 +77,15 @@
onSocketTimeOut(e);
}
+ if (!shouldContinue()) {
+ break;
+ }
+
if (hasTestLivedLongEnough()) {
shutdown();
}
- } while (shouldContinue());
+ } while (true);
log.fine("Test ended successfully.");
}