db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Issue with JUnit - 0 tests?
Date Sat, 06 Jun 2009 06:52:37 GMT
Tiago Espinha <tiago@espinhas.net> writes:

> Thanks to Kathey, we were able to find out the problem and the
> solution for the issue. It turns out that the test has the following
> check on the suite() method:
> if (!Derby.hasServer() ||
> !Locale.getDefault().getLanguage().equals("en") ||
> JDBC.vmSupportsJSR169())
> Since the locale on my machine is probably set to Portuguese, it
> wouldn't run the test at all. The solution was to override the locale
> with the following properties:
> -Duser.language=2-char-language-code -Duser.region=2-char-country-code
> Set it to any anglophone country, with the respective 'en' language
> code and it all starts working.

Hi Tiago,

Do you think it would make sense for this test to call
Locale.setDefault(Locale.US) in setUp() and reset the locale in
tearDown()?  Something similar is done in SysinfoLocaleTest. If we do
so, we should probably factor it out in a separate decorator class to
make it easier to use in other tests later.

Knut Anders

View raw message