This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new d7af9d62a ci: stop the openapi itests racing their own timer (#3057)
d7af9d62a is described below

commit d7af9d62adef86d8a3338ef0b0765bae1447e3ee
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Sep 23 09:49:22 2026 +0200

    ci: stop the openapi itests racing their own timer (#3057)
    
    rest-openapi-sink-add-pet-test and rest-openapi-sink-delete-pet-test fail
    intermittently with
    
      Values not equal for header element 'citrus_http_request_uri',
      expected '/petstore/pet' but was '/petstore/openapi.json'
    
    Both drive rest-openapi-sink-route.yaml, whose timer-source fires every ten
    seconds and keeps firing. Each test asserts one full cycle: a GET for the
    specification, a response carrying it, then the operation call. When that 
cycle
    takes longer than the period, the next firing's specification fetch arrives 
at
    the point where the test is waiting for the operation, and the comparison 
fails
    on the URI.
    
    It is timing rather than anything in the Kamelets, which is why it comes and
    goes: locally the tests failed once and then passed four times in a row on 
the
    same commit, and the observed durations straddle the ten second period, from
    about twelve seconds to over thirty.
    
    timer-source already exposes repeatCount, so the route now sends exactly one
    message, which is what the assertions describe. The period is left alone 
since
    with a single firing it only delays the first message.
    
    Five consecutive runs pass, including runs of 23 and 25 seconds that would
    previously have been at risk of a second firing.
    
    Co-authored-by: Claude Opus 5 <[email protected]>
---
 .../src/test/resources/openapi/rest-openapi-sink-route.yaml            | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/tests/camel-kamelets-itest/src/test/resources/openapi/rest-openapi-sink-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/openapi/rest-openapi-sink-route.yaml
index 5834c1b90..1e4e61c82 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/openapi/rest-openapi-sink-route.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/openapi/rest-openapi-sink-route.yaml
@@ -19,6 +19,9 @@
     from:
       uri: "kamelet:timer-source"
       parameters:
+        # exactly one message: the test asserts a single spec fetch followed 
by a
+        # single operation call, and a second firing races those two assertions
+        repeatCount: 1
         period: 10000
         message: '{{pet}}'
       steps:

Reply via email to