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

In LuceneTestCase.beforeClass, make a new random (also using the class hashcode) to vary defaults

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0-ALPHA
    • 4.0-ALPHA
    • general/test
    • None
    • New

    Description

      In LuceneTestCase, we set many static defaults like:

      • default codec
      • default infostream impl
      • default locale
      • default timezone
      • default similarity

      Currently each test run gets a single seed for the run, which means for example across one test run
      every single test will have say, SimpleText + infostream=off + Locale=german + timezone=EDT + similarity=BM25

      Because of that, we lose lots of basic mixed coverage across tests, and it also means the unfortunate
      individual who gets SimpleText or other slow options gets a REALLY SLOW test run, rather than amortizing
      this across all test runs.

      We should at least make a new random (getRandom() ^ className.hashCode()) to fix this so it works like before,
      but unfortunately that only fixes it for LuceneTestCase.

      Won't any subclasses that make random decisions in @BeforeClass (and we have many) still have the same problem?
      Maybe RandomizedRunner can instead be improved here?

      Attachments

        Issue Links

          Activity

            People

              dweiss Dawid Weiss
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: