
jira at apache
Apr 25, 2012, 4:36 PM
Post #11 of 12
(86 views)
Permalink
|
|
[jira] [Commented] (LUCENE-4020) Tests may not be repeatable across different platforms/ JVMs due to different locale/ timezone being picked.
[In reply to]
|
|
[ https://issues.apache.org/jira/browse/LUCENE-4020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262244#comment-13262244 ] Robert Muir commented on LUCENE-4020: ------------------------------------- Patch is on 4021 for round trip parsing (in 6 and 7). It should also work across 6 and 7, e.g. in on java6 we emit th_TH_TH, on java7 th_TH_TH_#u-nu-thai, but both are constructed as th_TH_TH. This is ok because of the backwards mechanism (Special Cases) listed in http://docs.oracle.com/javase/7/docs/api/java/util/Locale.htm > Tests may not be repeatable across different platforms/ JVMs due to different locale/ timezone being picked. > ------------------------------------------------------------------------------------------------------------ > > Key: LUCENE-4020 > URL: https://issues.apache.org/jira/browse/LUCENE-4020 > Project: Lucene - Java > Issue Type: Bug > Reporter: Dawid Weiss > Assignee: Dawid Weiss > Priority: Minor > Fix For: 4.0 > > Attachments: LUCENE-4020.diff, LUCENE-4020.patch > > > This is because the source array can be/ is different for each system/ JVM. So this pick is not repeatable for example: > {code} > /** > * 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)]; > } > {code} > I don't think there is much we can do to make it repeatable (other than maybe enforcing locale using system property). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe [at] lucene For additional commands, e-mail: dev-help [at] lucene
|