Skip to content

fix TestRawZkClient unstableness#1295

Merged
jiajunwang merged 14 commits intoapache:masterfrom
kaisun2000:zkmonitor_#1294
Oct 2, 2020
Merged

fix TestRawZkClient unstableness#1295
jiajunwang merged 14 commits intoapache:masterfrom
kaisun2000:zkmonitor_#1294

Conversation

@kaisun2000
Copy link
Contributor

@kaisun2000 kaisun2000 commented Aug 20, 2020

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

Fix #1294

Description

  • Here are some details about my PR, including screenshots of any UI changes:

ZkClient connect to ZooKeeper client first before monitor bean
initialization. If the monitor is not fully constructed, the
test would pass. Otherwise, as in github, it would not. Fix this
issue by properly construct the object.

Tests

  • The following tests are written for this issue:

None

  • The following is the result of the "mvn test" command on the appropriate module:

In Old connection New session
After session expiry sessionId= 72277739317428225
Shut down zookeeper at port 2127 in thread main
Starting ZK server at localhost:2358
[INFO] Tests run: 44, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 701.476 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 44, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:47 min
[INFO] Finished at: 2020-08-19T18:11:02-07:00
[INFO] ------------------------------------------------------------------------
ksun-mn1:zookeeper-api ksun$ git status

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

ZkClient connect to ZooKeeper client first before monitor bean
initialization. If the monitor is not fully constructed, the
test would pass. Otherwise, as in github, it would not. Fix this
issue by properly construct the object.
@kaisun2000 kaisun2000 changed the title fix TestRawZkClient unstableness #1294 fix TestRawZkClient unstableness Aug 20, 2020
Copy link
Contributor

@huizhilu huizhilu left a comment

Choose a reason for hiding this comment

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

I'll look into this more carefully about the race condition.

Copy link
Contributor

@jiajunwang jiajunwang left a comment

Choose a reason for hiding this comment

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

I took a deeper look at the test logic. Since this might be the most important test in our code base, let's be careful to not lose any coverage.

For more details, we can discuss in next week's meeting.

Copy link
Contributor

@jiajunwang jiajunwang left a comment

Choose a reason for hiding this comment

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

LGTM! Please address the last comment.

@kaisun2000
Copy link
Contributor Author

kaisun2000 commented Sep 23, 2020

This diff is approved. Please help to merge

ZkClient connects to ZooKeeper before monitor bean
initialization and registration. This causes race condition that fails
metrics test. Fix this issue by properly construct the object.

@jiajunwang
Copy link
Contributor

@kaisun2000 Please run helix-core tests since the change impacts almost all logics.

@jiajunwang
Copy link
Contributor

@kaisun2000 you can rerun the test job in Github UI. There is no need to touch code for a re-run.

@huizhilu
Copy link
Contributor

I've triggered rerun the workflow.
FYI, @kaisun2000 This is a button for us to Re-run jobs.
image

@kaisun2000
Copy link
Contributor Author

@jiajunwang, @pkuwm, as we looked, my github page does not have this UI button to re-run. Other than that, any other concerns? Or let us merge this in.

@huizhilu
Copy link
Contributor

huizhilu commented Oct 1, 2020

@jiajunwang, @pkuwm, as we looked, my github page does not have this UI button to re-run. Other than that, any other concerns? Or let us merge this in.

@kaisun2000 I've helped re-run all the jobs.

@kaisun2000
Copy link
Contributor Author

@jiajunwang, removed the extra space to trigger run from my side. Please help to merge.

@jiajunwang jiajunwang merged commit f2e68c8 into apache:master Oct 2, 2020
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.

Fix flaky test TestRawZkClient.testZkClientMonitor()

4 participants