14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.jmx;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import jdk.management.jfr.RecordingInfo;
32 import jdk.test.lib.Asserts;
33
34 /*
35 * @test
36 * @key jfr
37 * @library /test/lib /test/jdk
38 * @run main/othervm jdk.jfr.jmx.TestGetRecordingsMultiple
39 */
40 public class TestGetRecordingsMultiple {
41
42 private static class TestRecording {
43 long id;
44 boolean isClosed;
45 public TestRecording(long id) {
46 this.id = id;
47 isClosed = false;
48 }
49 }
50
51 public static void main(String[] args) throws Throwable {
52 List<TestRecording> testRecordings = new ArrayList<>();
53 for (int i = 0; i < 5; ++i) {
54 verifyExistingRecordings(testRecordings);
55 testRecordings.add(createRecording());
56 if (i >= 1) {
|
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.jmx;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import jdk.management.jfr.RecordingInfo;
32 import jdk.test.lib.Asserts;
33
34 /**
35 * @test
36 * @key jfr
37 * @requires vm.hasJFR
38 * @library /test/lib /test/jdk
39 * @run main/othervm jdk.jfr.jmx.TestGetRecordingsMultiple
40 */
41 public class TestGetRecordingsMultiple {
42
43 private static class TestRecording {
44 long id;
45 boolean isClosed;
46 public TestRecording(long id) {
47 this.id = id;
48 isClosed = false;
49 }
50 }
51
52 public static void main(String[] args) throws Throwable {
53 List<TestRecording> testRecordings = new ArrayList<>();
54 for (int i = 0; i < 5; ++i) {
55 verifyExistingRecordings(testRecordings);
56 testRecordings.add(createRecording());
57 if (i >= 1) {
|