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

Tests may not be repeatable across different platforms/ JVMs due to different locale/ timezone being picked.

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0-ALPHA
    • None
    • None
    • New

    Description

      This is because the source array can be/ is different for each system/ JVM. So this pick is not repeatable for example:

        /** 
         * Return a random Locale from the available locales on the system.
         */
        public static Locale randomLocale(Random random) {
          Locale locales[] = Locale.getAvailableLocales();
          return locales[random.nextInt(locales.length)];
        }
      

      I don't think there is much we can do to make it repeatable (other than maybe enforcing locale using system property).

      Attachments

        1. LUCENE-4020.diff
          1 kB
          Dawid Weiss
        2. LUCENE-4020.patch
          8 kB
          Dawid Weiss

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: