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

Tests should use unique temporary directories

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.1
    • None
    • general/build
    • None
    • New

    Description

      We cannot safely use parallel tests (LUCENE-1709) because some test classes try to use temporary directories with the same name.
      So if these two happen to run at the same time, they conflict.

      For example TestIndexReader has code like this:

      File dirFile = new File(TEMP_DIR, "testIndex");
      

      But TestCompoundFile has similar code:

      File file = new File(TEMP_DIR, "testIndex");
      

      If both these classes run at the same time, there will be problems.

      If we want to use parallel tests safely, we have to fix this use of the static TEMP_DIR which does not include any unique name of the test.
      Ideally we can do this without changing a lot of test code, especially backwards.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: