[ 
https://issues.apache.org/jira/browse/CAMEL-27868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27868:
--------------------------------
    Description: 
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_

  was:
Found while improving the option descriptions of camel-dataset for CAMEL-23832 
(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_


> 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
>            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)

Reply via email to