Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZOOKEEPER-4232: InvalidSnapshotTest corrupts its own test data
`InvalidSnapshotTest.testSnapshot` starts an instance of `ZooKeeperServer` on the version-controlled `resources/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: 1. It makes the test ineffective after the first run; 2. The file shows as modified in version control tools, which can be annoying; 3. The \"fixed\" snapshot can end up being committed by mistake, 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#1627 from ztzg/ZOOKEEPER-4232-invalid-snapshot-is-invalid-x-3.7 and squashes the following commits: c18a895 [Damien Diederen] ZOOKEEPER-4232: Ensure that ZOOKEEPER-367 test data fails to parse 42a5a0b [Damien Diederen] ZOOKEEPER-4232: Run InvalidSnapshotTest on a copy of test data
- Loading branch information