Skip to content

Conversation

guozhangwang
Copy link
Contributor

No description provided.

@guozhangwang
Copy link
Contributor Author

ping @dguy @enothereska @mjsax @ijuma @ewencp for reviews.

}

if (!testCondition.conditionMet()) {
if (!conditionMet) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change really required? It seems like pretty much any test that requires it is going to be fragile as it implies that the condition may only be met for < 100ms. Normally I would expect anything using waitForCondition to expect that condition to switch to true and stay in that state until the test returns from waitForCondition and takes further action such that the condition could change.

Copy link
Member

@ijuma ijuma Aug 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

If we did hit this problem, then perhaps we should throw an exception if the condition changes between both checks with a message about fixing the condition to make the tests less fragile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm convinced, will change it back.

@ijuma
Copy link
Member

ijuma commented Aug 17, 2016

Jenkins failed on org.apache.kafka.streams.integration.RegexSourceIntegrationTest.testRegexMatchesTopicsAWhenDeleted

@guozhangwang
Copy link
Contributor Author

Discussed with @hachikuji about this issue, and it may be the result of KAFKA-3949, but it is a bit hard to confirm as I have not been able to re-produce locally. So I'll hold on this PR until that issue is fixed to see if it does resolve the transient failure.

@guozhangwang
Copy link
Contributor Author

Waiting for consecutive jenkins builds on #1762 now.

…into K4049-RegexSourceIntegrationTest-failure
@guozhangwang
Copy link
Contributor Author

#1762 seems not the root cause of this failure, will continue investigating in this PR.

@guozhangwang
Copy link
Contributor Author

Triggered Jenkins build 5181 - 5185 for this commit.

@guozhangwang
Copy link
Contributor Author

Apache Jenkins builds are not from expected commit, using https://jenkins.confluent.io/job/kafka-branch-builder/ instead, with consecutive 74 - 78

@guozhangwang
Copy link
Contributor Author

Consecutive tests in https://jenkins.confluent.io/job/kafka-branch-builder/ from 78 to 82. @ijuma mind taking a look again?

public boolean conditionMet() {
List<String> assignedTopics = testStreamThread.assignedTopicPartitions.get(SECOND_UPDATE);
return assignedTopics != null && !assignedTopics.contains("TEST-TOPIC-A") && assignedTopics.contains("TEST-TOPIC-B");
System.out.println("deleted: " + testStreamThread.assignedTopicPartitions);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably left by mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm aware of the changes and I intended to delete them before merging after your reviews. I should be more explicit on these two prints.

@ijuma
Copy link
Member

ijuma commented Aug 22, 2016

@guozhangwang it's worth noting that this test never failed in Confluent Jenkins (as far as I could see), only Apache Jenkins. Apache Jenkins runs the tests with fork=1 while Confluent uses a higher fork count. Usually this makes Apache Jenkins more stable, but it may be having the opposite effect in this case (or there's another reason why the test fails in Apache Jenkins). If you want to be confident that this change fixes the issue, we'd want to run it in Apache Jenkins.

@ijuma
Copy link
Member

ijuma commented Aug 22, 2016

This failure became quite rare at some point, last failure in trunk jdk7 build was a while back. Since this PR seems like an improvement anyway, LGTM (assuming the tests pass). If the test fails again, we can reopen the JIRA.

@guozhangwang
Copy link
Contributor Author

Transient failure in Jenkins is not relevant; created https://issues.apache.org/jira/browse/KAFKA-4075 for it.

@guozhangwang
Copy link
Contributor Author

Thanks @ijuma , merged to trunk.

@asfgit asfgit closed this in f903215 Aug 22, 2016
@guozhangwang guozhangwang deleted the K4049-RegexSourceIntegrationTest-failure branch July 15, 2017 22:08
efeg pushed a commit to efeg/kafka that referenced this pull request May 29, 2024
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

Successfully merging this pull request may close these issues.

3 participants