[ 
https://issues.apache.org/jira/browse/KAFKA-4859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923095#comment-15923095
 ] 

Armin Braun commented on KAFKA-4859:
------------------------------------

[~guozhang] so basically this can just be resolved by setting a higher timeout 
on the waiting before the last assert at the end of the test.

{code:java}
        final List<KeyValue<String, Long>> actualClicksPerRegion = 
IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(consumerConfig,
            outputTopic, expectedClicksPerRegion.size(), 2 * 
IntegrationTestUtils.DEFAULT_TIMEOUT);
        assertThat(actualClicksPerRegion, equalTo(expectedClicksPerRegion));
   }
{code}

Tested this over 200+ iterations just now, while I get to less than 30 without 
this adjustment.
What I find interesting though is that the runtime for this test is always very 
close to 30s. Always kind of between 30.4s - 30.6s. Is this just a coincidence 
or is that 30s maybe coming from some place I missed and would allow expressing 
the timeout a little cleaner (i.e. as some constant + x)?
If not I'd just put in a PR with the raised timeout?

> Transient test failure: 
> org.apache.kafka.streams.integration.JoinIntegrationTest.shouldCountClicksPerRegion
>  (again)
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-4859
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4859
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: streams
>            Reporter: Armin Braun
>            Assignee: Armin Braun
>
> Slightly different than KAFKA-3874 in terms of the way it fails.
> Now we have:
> {code}
> Error Message
> java.lang.AssertionError: Condition not met within timeout 30000. Expecting 3 
> records from topic output-topic-2 while only received 0: []
> Stacktrace
> java.lang.AssertionError: Condition not met within timeout 30000. Expecting 3 
> records from topic output-topic-2 while only received 0: []
>       at org.apache.kafka.test.TestUtils.waitForCondition(TestUtils.java:257)
>       at 
> org.apache.kafka.streams.integration.utils.IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(IntegrationTestUtils.java:206)
>       at 
> org.apache.kafka.streams.integration.utils.IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(IntegrationTestUtils.java:175)
>       at 
> org.apache.kafka.streams.integration.KStreamKTableJoinIntegrationTest.shouldCountClicksPerRegion(KStreamKTableJoinIntegrationTest.java:297)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> {code}
> e.g. here https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/2032/



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to