Aurélien Pupier created CAMEL-27595:
---------------------------------------

             Summary: Fix flaky test KafkaTransactionIT
                 Key: CAMEL-27595
                 URL: https://issues.apache.org/jira/browse/CAMEL-27595
             Project: Camel
          Issue Type: Test
          Components: camel-kafka
    Affects Versions: 4.24.0
            Reporter: Aurélien Pupier


[flaky 4 times in last 
month|https://develocity.apache.org/scans/tests?search.relativeStartTime=P90D&search.rootProjectNames=camel&search.tags=main&search.timeZoneId=Europe%2FParis&tests.container=*KafkaTransactionIT]


{noformat}
org.apache.camel.CamelExecutionException: Exception occurred during execution 
on the exchange: Exchange[014739F3E68F4C2-0000000000000032]
        at 
org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:60)
        at 
org.apache.camel.support.ExchangeHelper.extractResultBody(ExchangeHelper.java:737)
        at 
org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:600)
        at 
org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:596)
        at 
org.apache.camel.impl.engine.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:318)
        at 
org.apache.camel.impl.engine.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:310)
        at 
org.apache.camel.component.kafka.integration.common.TestProducerUtil.sendMessagesInRoute(TestProducerUtil.java:45)
        at 
org.apache.camel.component.kafka.integration.common.TestProducerUtil.sendMessagesInRoute(TestProducerUtil.java:39)
        at 
org.apache.camel.component.kafka.integration.KafkaTransactionIT.producedTransactionMassageIsReceivedByKafka(KafkaTransactionIT.java:142)
Caused by: org.apache.kafka.common.errors.NotLeaderOrFollowerException: For 
requests intended only for the leader, this error indicates that the broker is 
not the current leader. For requests intended for any replica, this error 
indicates that the broker is not a replica of the topic partition.

{noformat}

{noformat}
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a 
Lambda expression in 
org.apache.camel.component.kafka.integration.KafkaTransactionIT All messages 
should have been consumed ==> expected: <0> but was: <3> within 20 seconds.   
        at 
org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)        
        at 
org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)    
        at 
org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)     
        at 
org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)       
        at 
org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)   
     
        at 
org.apache.camel.component.kafka.integration.KafkaTransactionIT.createKafkaMessageConsumer(KafkaTransactionIT.java:201)
      
        at 
org.apache.camel.component.kafka.integration.KafkaTransactionIT.concurrencyProducedTransactionMessage(KafkaTransactionIT.java:127)
   
Caused by: org.opentest4j.AssertionFailedError: All messages should have been 
consumed ==> expected: <0> but was: <3>   
        at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:705)   
        at 
org.apache.camel.component.kafka.integration.KafkaTransactionIT.lambda$createKafkaMessageConsumer$0(KafkaTransactionIT.java:206)
     
{noformat}




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to