From 3d7614c63156f6db46335748f572bfb1cad67ab5 Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Thu, 22 Jun 2023 06:44:39 +0000 Subject: [PATCH 1/2] 8095: Update org.openjdk.jmc.flightrecorder.rules.test/.classpath after JMC-8086 Reviewed-by: aptmac --- .../org.openjdk.jmc.flightrecorder.rules.test/.classpath | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/tests/org.openjdk.jmc.flightrecorder.rules.test/.classpath b/core/tests/org.openjdk.jmc.flightrecorder.rules.test/.classpath index d63f0e1395..69d513d66b 100644 --- a/core/tests/org.openjdk.jmc.flightrecorder.rules.test/.classpath +++ b/core/tests/org.openjdk.jmc.flightrecorder.rules.test/.classpath @@ -17,5 +17,10 @@ + + + + + From 5ace151b6dc00096b5b3212edfad40e86f8bcf8d Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Thu, 22 Jun 2023 20:14:45 +0000 Subject: [PATCH 2/2] 8096: EventTemplateTest fails for JDKs with custom jfr profiles Reviewed-by: aptmac --- .../services/jfr/test/EventTemplateTest.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/EventTemplateTest.java b/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/EventTemplateTest.java index 176ce91c00..a44fb25fb4 100644 --- a/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/EventTemplateTest.java +++ b/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/EventTemplateTest.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. - * + * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * The contents of this file are subject to the terms of either the Universal Permissive License @@ -10,17 +10,17 @@ * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions * and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials provided with * the distribution. - * + * * 3. Neither the name of the copyright holder nor the names of its contributors may be used to * endorse or promote products derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR @@ -32,17 +32,16 @@ */ package org.openjdk.jmc.rjmx.services.jfr.test; -import static org.junit.Assert.assertNotNull; - import java.util.Collection; import java.util.List; import org.junit.Assert; import org.junit.Test; - import org.openjdk.jmc.flightrecorder.configuration.events.IEventTypeID; import org.openjdk.jmc.rjmx.services.jfr.IFlightRecorderService; +import static org.junit.Assert.assertNotNull; + @SuppressWarnings("nls") public class EventTemplateTest extends JfrTestCase { @Test @@ -59,7 +58,8 @@ public void testCheckAllEventsInServerTemplates() throws Exception { assumeHotSpot7u12OrLater(getConnectionHandle()); IFlightRecorderService service = getFlightRecorderService(); - List templates = service.getServerTemplates(); + List templates = service.getServerTemplates().stream().filter(t -> t.contains("provider=\"Oracle\"")) + .toList(); Collection allEventTypes = service.getEventTypeInfoMapByID().keySet(); for (IEventTypeID eventTypeId : allEventTypes) {