Skip to content

SAMZA-2711: Fix flaky TestZkLocalApplicationRunner#1563

Merged
cameronlee314 merged 1 commit intoapache:masterfrom
jia-gao:fixtest
Dec 6, 2021
Merged

SAMZA-2711: Fix flaky TestZkLocalApplicationRunner#1563
cameronlee314 merged 1 commit intoapache:masterfrom
jia-gao:fixtest

Conversation

@jia-gao
Copy link
Contributor

@jia-gao jia-gao commented Nov 24, 2021

Issues:
TestZkLocalApplicationRunner.shouldStopNewProcessorsJoiningGroupWhenNumContainersIsGreaterThanNumTasks asserts
A) JobModel generated before and after the addition of appRunner2 should be equal.
B) Second stream application(appRunner2) should not join the group and process any message.

Assertion A is good, but the test can not guarantee Assertion B.
The reason is that the test kill appRunner1 then kill appRunner2, but after appRunner1 got killed and before appRunner2 gets killed, ZkJobCoordinator could generate a new JobModel with appRunner 2
That leads to appRunner2 status change from New->Running->SuccessfulFinish
instead of New->UnsuccessfulFinish, which result in the test failure

Changes:
kill appRunner2 and do assertion before kill appRunner1

Tests: ./gradlew build
API changes: N/A

Copy link
Contributor

@cameronlee314 cameronlee314 left a comment

Choose a reason for hiding this comment

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

Thanks!

@cameronlee314 cameronlee314 merged commit 5714ff9 into apache:master Dec 6, 2021
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.

2 participants