ZOOKEEPER-4232: InvalidSnapshotTest corrupts its own test data #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
InvalidSnapshotTest.testSnapshot
starts an instance ofZooKeeperServer
on the version-controlledresources/data/invalidsnap
directory, which, as a side-effect, "fixes" the following
snapshot—which was broken on purpose (see ZOOKEEPER-367):
zookeeper-server/src/test/resources/data/invalidsnap/version-2/snapshot.83f
This status quo creates a number of problems:
annoying;
invalidating the test.
(#3 is not theoretical; that "fixed" snapshot frequently shows up in
pull requests, and was recently merged into master.).
Author: Damien Diederen [email protected]
Reviewers: Mohammad Arshad [email protected]
Closes apache#1622 from ztzg/ZOOKEEPER-4232-invalid-snapshot-is-invalid and squashes the following commits:
8b48eea [Damien Diederen] ZOOKEEPER-4232: Ensure that ZOOKEEPER-367 test data fails to parse
9250756 [Damien Diederen] ZOOKEEPER-4232: Run InvalidSnapshotTest on a copy of test data
dcf5604 [Damien Diederen] ZOOKEEPER-4232: Restore test data for ZOOKEEPER-367