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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ztzg Damien Diederen
            ztzg Damien Diederen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            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

                Slack

                  Issue deployment