tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Allison <talli...@apache.org>
Subject Re: TabularFormatsTest test fails in Germany
Date Fri, 04 Oct 2019 17:22:17 GMT
Y.  It could be a configuration problem.  I agree that something weird
is going on in that you're getting a failure with the full build but
everything works ok with the local setting of Locale.

I think the full solution would allow users to pass in Locale via
ParseContext...and that _might_ work with some parsers now?  I'm not
sure...that would take some work to get all Parsers to support that,
but that would make testing more straightforward.

As for the question of are you the only one outside of the U.S.?  We
do have committers around the world, but we need more, as you're
finding.  Thank you for your patience!

On Fri, Oct 4, 2019 at 11:48 AM Tilman Hausherr <THausherr@t-online.de> wrote:
>
> Am 04.10.2019 um 17:32 schrieb Tim Allison:
> > Would it work to set the expected String to something generated with the
> > root locale?
>
> Yes, that makes sense.
>
> But I'm wondering whether this is a configuration problem - am I the
> first one outside the US who tried doing a build from source?
>
> Tilman
>
>
>
> >
> > On Fri, Oct 4, 2019 at 10:56 AM Tilman Hausherr <THausherr@t-online.de>
> > wrote:
> >
> >> So I wanted to build tika from source, and failed:
> >>
> >> Failures:
> >>     TabularFormatsTest.testSAS7BDAT:229->assertContents:216 en_US Wrong
> >> text in row 9 and column 7 - 03(MAR|Mar)(63|1963)[:\s]09:46:40(.00)? vs
> >> 03Mär1963:09:46:40.00
> >>     TabularFormatsTest.testXLS:236->assertContents:216 en_US Wrong text
> >> in row 9 and column 7 - 03(MAR|Mar)(63|1963)[:\s]09:46:40(.00)? vs
> >> 03Mär63 09:46:40
> >>     TabularFormatsTest.testXLSB:250->assertContents:216 en_US Wrong text
> >> in row 9 and column 7 - 03(MAR|Mar)(63|1963)[:\s]09:46:40(.00)? vs
> >> 03Mär63 09:46:40
> >>     TabularFormatsTest.testXLSX:243->assertContents:216 en_US Wrong text
> >> in row 9 and column 7 - 03(MAR|Mar)(63|1963)[:\s]09:46:40(.00)? vs
> >> 03Mär63 09:46:40
> >>
> >> It fails because the expected "Mar" is not identical to "Mär". I tried
> >> to set the Locale to the US
> >>
> >>       @Before
> >>       public void setUp()
> >>       {
> >>           Locale.setDefault(Locale.US);
> >>       }
> >>
> >> but this works only when the test is run alone, not if the whole build
> >> is running, despite that the Locale is set. See the output above, I have
> >> changed the assert to
> >>
> >> assertTrue(Locale.getDefault() + " " + error,
> >> ((Pattern)table[cn][rn]).matcher(val).matches());
> >>
> >> A possible solution would be to change the test file to have June
> >> instead of March, but we could still get in trouble e.g. in Russia,
> >> China, Korea, Thailand, Japan, ....
> >>
> >> Tilman
> >>
> >>
>

Mime
View raw message