Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7080

MockDirectoryWrapper relies on HashSet iteration order

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.5, 6.0
    • 6.0, 6.1, 7.0
    • general/test
    • None
    • New

    Description

      MDW relies on HashSet iteration order in

        public synchronized void corruptFiles(Collection<String> files) throws IOException {
          // Must make a copy because we change the incoming unsyncedFiles
          // when we create temp files, delete, etc., below:
          for(String name : new ArrayList<>(files)) { // <<<<< this should be sorted
            int damage = randomState.nextInt(6);
      

      this causes reproducibility issues when files get corrupted.

      Attachments

        1. LUCENE-7080.patch
          1 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: