[
https://issues.apache.org/jira/browse/LUCENE-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Muir updated LUCENE-1836:
--------------------------------
Attachment: LUCENE-1836.patch
i believe Uwe has found a real bug here.
take a look at my patch, in setUp() i set the default locale to German to
duplicate his environment.
without the change to ParametricRangeQuery, the test fails.
if this looks ok, I will then think of a (clean) way to modify the tests so we
don't have a future problem.
unfortunately to really test it nice, I think you need to change the default
locale as I did here... this is the only way I can think of to catch bugs like
this.
setting it to a random available locale doesn't seem to be best either, i would
rather run all the tests under each locale!
> Flexible QueryParser fails with local different from en_US
> ----------------------------------------------------------
>
> Key: LUCENE-1836
> URL: https://issues.apache.org/jira/browse/LUCENE-1836
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/*
> Affects Versions: 2.9
> Reporter: Uwe Schindler
> Assignee: Luis Alves
> Fix For: 2.9
>
> Attachments: LUCENE-1836.patch, LUCENE-1836.patch
>
>
> I get the following error during the mentioned testcases on my computer, if I
> use the Locale de_DE (windows 32):
> {code}
> [junit] Testsuite: org.apache.lucene.queryParser.standard.TestQPHelper
> [junit] Tests run: 29, Failures: 1, Errors: 0, Time elapsed: 1,156 sec
> [junit]
> [junit] ------------- Standard Output ---------------
> [junit] Result: (fieldX:xxxxx fieldy:xxxxxxxx)^2.0
> [junit] ------------- ---------------- ---------------
> [junit] Testcase:
> testLocalDateFormat(org.apache.lucene.queryParser.standard.TestQPHelper):
> FAILED
> [junit] expected:<1> but was:<0>
> [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0>
> [junit] at
> org.apache.lucene.queryParser.standard.TestQPHelper.assertHits(TestQPHelper.java:1148)
> [junit] at
> org.apache.lucene.queryParser.standard.TestQPHelper.testLocalDateFormat(TestQPHelper.java:1005)
> [junit] at
> org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:201)
> [junit]
> [junit]
> [junit] Test org.apache.lucene.queryParser.standard.TestQPHelper FAILED
> [junit] Testsuite:
> org.apache.lucene.queryParser.standard.TestQueryParserWrapper
> [junit] Tests run: 27, Failures: 1, Errors: 0, Time elapsed: 1,219 sec
> [junit]
> [junit] ------------- Standard Output ---------------
> [junit] Result: (fieldX:xxxxx fieldy:xxxxxxxx)^2.0
> [junit] ------------- ---------------- ---------------
> [junit] Testcase:
> testLocalDateFormat(org.apache.lucene.queryParser.standard.TestQueryParserWrapper):
> FAILED
> [junit] expected:<1> but was:<0>
> [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0>
> [junit] at
> org.apache.lucene.queryParser.standard.TestQueryParserWrapper.assertHits(TestQueryParserWrapper.java:1120)
> [junit] at
> org.apache.lucene.queryParser.standard.TestQueryParserWrapper.testLocalDateFormat(TestQueryParserWrapper.java:985)
> [junit] at
> org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:201)
> [junit]
> [junit]
> [junit] Test
> org.apache.lucene.queryParser.standard.TestQueryParserWrapper FAILED
> {code}
> With en_US as locale it works.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]