Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 699F198EA for ; Wed, 25 Apr 2012 23:14:42 +0000 (UTC) Received: (qmail 26006 invoked by uid 500); 25 Apr 2012 23:14:41 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 25951 invoked by uid 500); 25 Apr 2012 23:14:41 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 25943 invoked by uid 99); 25 Apr 2012 23:14:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 23:14:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 23:14:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B20E940EA44 for ; Wed, 25 Apr 2012 23:14:17 +0000 (UTC) Date: Wed, 25 Apr 2012 23:14:17 +0000 (UTC) From: "Hoss Man (JIRA)" To: dev@lucene.apache.org Message-ID: <1016086829.3035.1335395657749.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1660117406.475.1335304805861.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-4020) Tests may not be repeatable across different platforms/ JVMs due to different locale/ timezone being picked. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262232#comment-13262232 ] Hoss Man commented on LUCENE-4020: ---------------------------------- so the exception name isn't great ... but the point is there should be a decent number of Locales that work, and we should be able to try N times to find one, nad if we really don't then give up because we can't run a reproducible test. (or hell: don't give up .. try 100 times and if we still don't get one that round trips just use whatever we did get and let the user deal with the fact that they can't pass that locale back in to reproduce if it fails) > 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@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org