[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractConsumerTest-based tests can fail under load #119

Open
ewencp opened this issue Oct 22, 2015 · 0 comments
Open

AbstractConsumerTest-based tests can fail under load #119

ewencp opened this issue Oct 22, 2015 · 0 comments

Comments

@ewencp
Copy link
Contributor
ewencp commented Oct 22, 2015

The AbstractConsumerTest.consumeMessages method can sometimes fail when a test server is under load because the request to the REST Proxy returns fewer messages than expected. Even if messages have been produced with acks=all, this code assumes that the consumer will fetch them all promptly enough to return them. This causes transient errors in the tests which, unsurprisingly, occur more frequently on more heavily loaded machines, e.g. Jenkins servers running multiple builds concurrently.

For example, ConsumerBinaryTest.testConsumeTimeout produces some messages, consumes them, then validates that a subsequent consume call will reach the timeout. However, you'll sometimes see the first step to consume messages fail because it returns fewer messages than expected.

java.lang.AssertionError: expected:<4> but was:<3>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:834)
    at org.junit.Assert.assertEquals(Assert.java:645)
    at org.junit.Assert.assertEquals(Assert.java:631)
    at io.confluent.kafkarest.integration.AbstractConsumerTest.consumeMessages(AbstractConsumerTest.java:271)
    at io.confluent.kafkarest.integration.ConsumerBinaryTest.testConsumeTimeout(ConsumerBinaryTest.java:132)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant