This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d03b07c13b89 CAMEL-24003: Fix BacklogTracerActivityTest to enable
activity before sending messages
d03b07c13b89 is described below
commit d03b07c13b890ca869435502fc3799d6c2014892
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jul 13 19:13:30 2026 +0200
CAMEL-24003: Fix BacklogTracerActivityTest to enable activity before
sending messages
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../org/apache/camel/management/BacklogTracerActivityTest.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/core/camel-management/src/test/java/org/apache/camel/management/BacklogTracerActivityTest.java
b/core/camel-management/src/test/java/org/apache/camel/management/BacklogTracerActivityTest.java
index 4f90906de9bc..f4daf26f5af6 100644
---
a/core/camel-management/src/test/java/org/apache/camel/management/BacklogTracerActivityTest.java
+++
b/core/camel-management/src/test/java/org/apache/camel/management/BacklogTracerActivityTest.java
@@ -82,7 +82,8 @@ public class BacklogTracerActivityTest extends
ManagementTestSupport {
assertNotNull(on);
assertTrue(mbeanServer.isRegistered(on));
- // set activity size to 5
+ // enable activity and set activity size to 5
+ mbeanServer.setAttribute(on, new Attribute("ActivityEnabled", true));
mbeanServer.setAttribute(on, new Attribute("ActivitySize", 5));
Integer activitySize = (Integer) mbeanServer.getAttribute(on,
"ActivitySize");
assertEquals(5, activitySize.intValue());
@@ -121,6 +122,9 @@ public class BacklogTracerActivityTest extends
ManagementTestSupport {
assertNotNull(on);
assertTrue(mbeanServer.isRegistered(on));
+ // enable activity via JMX
+ mbeanServer.setAttribute(on, new Attribute("ActivityEnabled", true));
+
getMockEndpoint("mock:foo").expectedMessageCount(2);
getMockEndpoint("mock:bar").expectedMessageCount(2);
@@ -150,6 +154,9 @@ public class BacklogTracerActivityTest extends
ManagementTestSupport {
assertNotNull(on);
assertTrue(mbeanServer.isRegistered(on));
+ // enable activity via JMX
+ mbeanServer.setAttribute(on, new Attribute("ActivityEnabled", true));
+
getMockEndpoint("mock:foo").expectedMessageCount(1);
getMockEndpoint("mock:bar").expectedMessageCount(1);