You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/06/01 05:17:03 UTC

(camel) branch main updated: CAMEL-19527: remove unnecessary Thread.sleep from JMX monitor tests

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 6184ec23f1b7 CAMEL-19527: remove unnecessary Thread.sleep from JMX monitor tests
6184ec23f1b7 is described below

commit 6184ec23f1b7de76c7ad75f02ca084572e40d5fd
Author: gbhavya07 <gb...@gmail.com>
AuthorDate: Mon Jun 1 10:46:55 2026 +0530

    CAMEL-19527: remove unnecessary Thread.sleep from JMX monitor tests
    
    Remove Thread.sleep(600) calls from JMXMonitorTypeGaugeTest and
    JMXMonitorTypeStringMatchesTest. The JMX monitor state machines do
    not require observing intermediate attribute values — the existing
    waitForMessages() synchronization is sufficient.
    
    Closes #23655
---
 .../java/org/apache/camel/component/jmx/JMXMonitorTypeGaugeTest.java    | 2 --
 .../org/apache/camel/component/jmx/JMXMonitorTypeStringMatchesTest.java | 1 -
 2 files changed, 3 deletions(-)

diff --git a/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeGaugeTest.java b/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeGaugeTest.java
index 991c52c4961b..76ed9f87024b 100644
--- a/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeGaugeTest.java
+++ b/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeGaugeTest.java
@@ -36,9 +36,7 @@ public class JMXMonitorTypeGaugeTest extends SimpleBeanFixture {
 
         getMockFixture().getMockEndpoint().setExpectedMessageCount(1);
         simpleBean.setMonitorNumber(90);
-        Thread.sleep(600);
         simpleBean.setMonitorNumber(60);
-        Thread.sleep(600);
         simpleBean.setMonitorNumber(40);
         getMockFixture().waitForMessages();
         getMockFixture().assertMessageReceived(new File("src/test/resources/monitor-consumer/gaugeNotification-low.xml"));
diff --git a/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeStringMatchesTest.java b/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeStringMatchesTest.java
index 307e4b1ec8cc..46c0f4d2b05a 100644
--- a/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeStringMatchesTest.java
+++ b/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXMonitorTypeStringMatchesTest.java
@@ -29,7 +29,6 @@ public class JMXMonitorTypeStringMatchesTest extends SimpleBeanFixture {
         ISimpleMXBean simpleBean = getSimpleMXBean();
 
         simpleBean.setStringValue("bogus");
-        Thread.sleep(600);
         simpleBean.setStringValue("initial");
         getMockFixture().waitForMessages();
         getMockFixture().assertMessageReceived(new File("src/test/resources/monitor-consumer/stringMatches.xml"));