[
https://issues.apache.org/jira/browse/CAMEL-27868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18153294#comment-18153294
]
Guillaume Nodet commented on CAMEL-27868:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Confirmed bugs: (1) DataSetEndpoint.waitForCompleteLatch() reuses the count
variable for both the previous total and the delta, causing an infinite loop
when minRate is set. (2) DataSetTestComponent.createEndpoint() calls
getAndRemoveParameter(..., Long.class) for the timeout parameter, rejecting
Duration strings like "2s" even though the catalog declares it as
java.time.Duration. A previous fix attempt on branch
fix/camel-27868-minrate-loop-timeout timed out before opening a PR.
Re-dispatching now.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> camel-dataset: minRate makes assertIsSatisfied loop forever, dataset-test
> timeout fails with a duration value
> -------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27868
> URL: https://issues.apache.org/jira/browse/CAMEL-27868
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-dataset for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/1aaff12f7925110d68d6576bdc6977b75773cc4a,
> pull request https://github.com/apache/camel/pull/31146).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. minRate makes assertIsSatisfied loop forever
> In {{DataSetEndpoint.waitForCompleteLatch(long)}} with minRate > 0, count =
> getReceivedCounter() - count overwrites the total with the delta, so the loop
> never ends once it has looped once, and with the latch at 0 it busy-spins.
> Reproduced: SimpleDataSet(2000), produceDelay=1, resultWaitTime=500,
> minRate=10 was still waiting 20 s after all messages arrived.
> Proposed change: keep the previous total and the delta separately, and stop
> when the latch is 0.
> h4. 2. dataset-test timeout fails with a duration
> {{DataSetTestComponent.createEndpoint}} reads timeout with
> getAndRemoveParameter(..., Long.class); the catalog declares a Duration, and
> timeout=2s fails with NumberFormatException (reproduced).
> Proposed change: let setProperties (the configurer) handle it.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)