gnodet-bot commented on code in PR #27201:
URL: https://github.com/apache/camel/pull/27201#discussion_r4157579248


##########
components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java:
##########
@@ -78,21 +83,25 @@ public void setup(TestInfo testInfo) {
     }
 
     /**
-     * Monitor multiple events
+     * Monitor multiple events With explicit parameters for 
requestedPublishingInterval, samplingInterval, and queueSize
      */
     @Test
     public void testMonitorItem1() throws Exception {
         /*
-         * we will wait 2 * 1_000 milliseconds between server updates since the
-         * default server update rate is 1_000 milliseconds
+         * we will wait 2 * 100 milliseconds between server updates since the
+         * explicitly set update rate is 100 milliseconds (samplingInterval)
+         * With 2000ms requestedPublishingInterval and bigger queueSize of 10 
we should get all updates,

Review Comment:
   ⚠️ **Comment/code mismatch.** The comment says "queueSize of 10" but the URI 
on line 52 has `queueSize=4`. This is confusing — the test was changed from 10 
to 4 but the comment wasn't updated.
   
   ```suggestion
            * explicitly set update rate is 100 milliseconds (samplingInterval)
            * With 2000ms requestedPublishingInterval and queueSize of 4 we 
should get all updates
            * for the first 3, but later bursts of 15 messages overflow the 
queue.
   ```



##########
components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java:
##########
@@ -78,21 +83,25 @@ public void setup(TestInfo testInfo) {
     }
 
     /**
-     * Monitor multiple events
+     * Monitor multiple events With explicit parameters for 
requestedPublishingInterval, samplingInterval, and queueSize
      */
     @Test
     public void testMonitorItem1() throws Exception {
         /*
-         * we will wait 2 * 1_000 milliseconds between server updates since the
-         * default server update rate is 1_000 milliseconds
+         * we will wait 2 * 100 milliseconds between server updates since the
+         * explicitly set update rate is 100 milliseconds (samplingInterval)
+         * With 2000ms requestedPublishingInterval and bigger queueSize of 10 
we should get all updates,
+         *
          */
-        final var time = 2 * 1_000;
+        final var time = 2 * 100;
         final var timeout = 10 * 1_000; // 10 seconds timeout for assertions
 
         // item 1 ... only this one receives
         test1Endpoint.reset();
-        test1Endpoint.setExpectedCount(3);
+        test1Endpoint.setMinimumExpectedMessageCount(5);    // the first 3, 
plus at least 4 more from rest (if they fall to 1 period)
+        test1Endpoint.setAssertPeriod(timeout);
 

Review Comment:
   💡 **Dead code.** Remove the commented-out line — it does nothing and reads 
like a debugging leftover.
   
   ```suggestion
   ```



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -4091,3 +4091,15 @@ scan for nothing. A route file inside a dot directory is 
therefore no longer wat
 2000 milliseconds, so on Linux and Windows a change is noticed within two 
seconds rather than immediately, and on macOS
 within two seconds rather than up to ten. A new `setStableTimeout` (default 
200 milliseconds) leaves a file that was
 only just modified for the next scan, so a save still being written is not 
reloaded half-finished.
+
+=== camel-milo - potential breaking change
+
+Sampling interval behaviour changes for users who never set it.
+Since 4.16, the samplingInterval default of 0.0 was ignored and milo's own 
OpcUaMonitoredItem default of 1000 ms was used.
+Now 0.0 is sent again, which asks the server to sample as fast as it can.
+The same applies to a configured requestedPublishingInterval or data-change 
filter, which now take effect.
+This restores the documented and pre-4.16 behaviour.
+
+The parameter dataChangeFilterDeadbandType changes type from UInteger to 
Integer.
+This changes the public MonitorFilterConfiguration getter/setter and the 
endpoint-DSL builder method, so Java code passing a UInteger
+will no longer compile.

Review Comment:
   💡 **Missing trailing newline.** The file ends without a newline (`\ No 
newline at end of file` in the diff). Most projects enforce POSIX-compliant 
text files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to