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

MockDirectoryWrapper relies on HashSet iteration order

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5, 6.0
    • Fix Version/s: 6.0, 6.1, 7.0
    • Component/s: general/test
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: