# HG changeset patch # User asapre # Date 1516086501 -19800 # Node ID eb5a14ac1e429d976cbed1c402e486336de4b98c # Parent 4899ee4eb332c6b67797bb9a98998d9f9a851082 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 diff -r 4899ee4eb332 -r eb5a14ac1e42 test/jdk/ProblemList.txt --- 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 ############################################################################ diff -r 4899ee4eb332 -r eb5a14ac1e42 test/jdk/sun/management/jdp/JdpTestCase.java --- 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."); }