Skip to content

Fix failed tests in helix-rest#966

Merged
junkaixue merged 1 commit intoapache:masterfrom
huizhilu:fix-rest
Apr 24, 2020
Merged

Fix failed tests in helix-rest#966
junkaixue merged 1 commit intoapache:masterfrom
huizhilu:fix-rest

Conversation

@huizhilu
Copy link
Contributor

@huizhilu huizhilu commented Apr 23, 2020

Issues

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

Fixes #965

Description

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

  • In these tests, the zkClient is trying to read/write ZNRecords, but zkClient's serializer is not a ZNRecordSerializer but a BasicZkSerializer. So when read/write a ZNRecord, a ZkMarshallingError is thrown and causes the tests failed.

  • Some developers don't see these failures, because the ordering of running tests are different on different environments (different maven version, OS). And the zkClient's is a based one and its serializer type is changed to ZNRecordSerializer in other tests. So if other tests are run before TestZkRoutingDataWriter, the tests pass. Otherwise, some developers would see the failures.

  • Change the zkClient to _gZkClientTestNS which uses ZNRecordSerializer

Tests

  • The following tests are written for this issue:

Fix tests:

  • TestZkRoutingDataWriter

  • TestZkRoutingDataReader

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

[INFO] Tests run: 159, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 44.264 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 159, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  50.445 s
[INFO] Finished at: 2020-04-23T13:12:15-07:00
[INFO] ------------------------------------------------------------------------

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"

Documentation (Optional)

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

(Link the GitHub wiki you added)

Code Quality

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

@huizhilu
Copy link
Contributor Author

This PR is ready to be merged, approved by @dasahcc

In tests: TestZkRoutingDataWriter and TestZkRoutingDataReader, the zkClient is trying to read/write ZNRecords, however, zkClient's serializer is not a ZNRecordSerializer but a BasicZkSerializer. So when read/write a ZNRecord, a ZkMarshallingError is thrown and causes the tests failed.
This commit fixes it by changing the zkClient to _gZkClientTestNS which uses ZNRecordSerializer.

@junkaixue junkaixue merged commit 2b40e1a into apache:master Apr 24, 2020
@huizhilu huizhilu deleted the fix-rest branch July 20, 2020 06:30
huizhilu added a commit to huizhilu/helix that referenced this pull request Aug 16, 2020
In tests: TestZkRoutingDataWriter and TestZkRoutingDataReader, the zkClient is trying to read/write ZNRecords, however, zkClient's serializer is not a ZNRecordSerializer but a BasicZkSerializer. So when read/write a ZNRecord, a ZkMarshallingError is thrown and causes the tests failed.
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.

Tests failed in helix-rest

2 participants