--- old/test/jdk/jdk/jfr/jmx/TestGetRecordings.java 2019-11-29 00:25:31.857545610 +0900 +++ new/test/jdk/jdk/jfr/jmx/TestGetRecordings.java 2019-11-29 00:25:31.741544818 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, 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 @@ -35,7 +35,7 @@ * @key jfr * @requires vm.hasJFR * @library /test/lib /test/jdk - * @run main/othervm jdk.jfr.jmx.TestGetRecordings + * @run main/othervm -Djdk.attach.allowAttachSelf=true -Dcom.sun.management.jmxremote jdk.jfr.jmx.TestGetRecordings */ public class TestGetRecordings { public static void main(String[] args) throws Throwable { @@ -46,5 +46,11 @@ JmxHelper.verifyNotExists(recId, preCreateRecordings); bean.closeRecording(recId); JmxHelper.verifyNotExists(recId, bean.getRecordings()); + + long selfPID = JmxHelper.getPID(); + FlightRecorderMXBean remoteBean = JmxHelper.getFlighteRecorderMXBean(selfPID); + long remoteRecId = remoteBean.newRecording(); + remoteBean.getRecordings(); + remoteBean.closeRecording(remoteRecId); } }