Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4232

InvalidSnapshotTest corrupts its own test data

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      InvalidSnapshotTest.testSnapshot starts an instance of ZooKeeperServer on the version-controlled invalidsnap directory, which, as a side-effect, "fixes" the following snapshot—which is 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.).

        Attachments

          Activity

            People

            • Assignee:
              ztzg Damien Diederen
              Reporter:
              ztzg Damien Diederen

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 40m
                2h 40m

                  Issue deployment