From 83df85441246a381396166efaf9ca0595dbb282c Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 4 Aug 2026 15:56:57 +0200 Subject: [PATCH] ci: fix CamelJfrDevConsoleTest for the registered -> runtimeEvents status rename CamelJfrDevConsole renamed its status field from "registered" to "runtimeEvents" (both the TEXT line and the JSON key, same isInstrumentationRegistered() value), but CamelJfrDevConsoleTest still asserted the old name, so its three status tests failed deterministically on main. Because camel-jfr is pulled into the scalpel build of any core-touching PR, this was failing unrelated PRs' CI. Update the assertions to the new field name. 17 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Andrea Cosentino --- .../apache/camel/runtime/jfr/CamelJfrDevConsoleTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/camel-jfr/src/test/java/org/apache/camel/runtime/jfr/CamelJfrDevConsoleTest.java b/components/camel-jfr/src/test/java/org/apache/camel/runtime/jfr/CamelJfrDevConsoleTest.java index eb9e105904aa2..cabb6dbe087e8 100644 --- a/components/camel-jfr/src/test/java/org/apache/camel/runtime/jfr/CamelJfrDevConsoleTest.java +++ b/components/camel-jfr/src/test/java/org/apache/camel/runtime/jfr/CamelJfrDevConsoleTest.java @@ -71,7 +71,7 @@ void statusReportsNotRegisteredByDefault() { String text = (String) console.call(DevConsole.MediaType.TEXT, Map.of("command", "status")); assertThat(text) - .contains("registered: false") + .contains("runtimeEvents: false") .contains("event route") .contains("event processor") .contains("event exchange") @@ -92,7 +92,7 @@ void statusReportsRegisteredWhenRuntimeInstrumentationEnabled() throws Exception String text = (String) resolveConsole(ctx).call(DevConsole.MediaType.TEXT, Map.of("command", "status")); - assertThat(text).contains("registered: true"); + assertThat(text).contains("runtimeEvents: true"); } } @@ -180,7 +180,7 @@ void jsonStatusAndToggleReflectLiveState() { CamelJfrDevConsole console = resolveConsole(context); try (Recording recording = startRecordingWithAllEvents()) { JsonObject status = (JsonObject) console.call(DevConsole.MediaType.JSON, Map.of("command", "status")); - assertThat(status.getBoolean("registered")).isFalse(); + assertThat(status.getBoolean("runtimeEvents")).isFalse(); assertThat(status.getJsonObject("events")).containsEntry("route", true); JsonObject toggle = (JsonObject) console.call(DevConsole.MediaType.JSON,