You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by rm...@apache.org on 2009/12/14 19:26:27 UTC

svn commit: r890427 - /lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java

Author: rmuir
Date: Mon Dec 14 18:26:26 2009
New Revision: 890427

URL: http://svn.apache.org/viewvc?rev=890427&view=rev
Log:
LUCENE-2155: add assertion to check if something changes default locale behind our back when using LocalizedTestCase

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java?rev=890427&r1=890426&r2=890427&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java Mon Dec 14 18:26:26 2009
@@ -73,6 +73,8 @@
 
   @Override
   protected void tearDown() throws Exception {
+    assertEquals("default locale unexpectedly changed:", locale, Locale
+        .getDefault());
     Locale.setDefault(defaultLocale);
     super.tearDown();
   }



Re: svn commit: r890427 - /lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java

Posted by Erick Erickson <er...@gmail.com>.
Thanks for letting me know, it's quite a relief to be able to trust the
@Parameterized
stuff.

Just let me know if you need me to regenerate the patch whenever you want to
apply it. Between now and then I'll find something else to do <G>...

Erick

On Mon, Dec 14, 2009 at 1:59 PM, Robert Muir <rc...@gmail.com> wrote:

> yeah i am convinced this is not a problem with your junit 4 patch Erick...
> as Uwe ran into the same trouble I ran into with the existing
> LocalizedTestCase
>
> however, if you don't mind, I'd like to let it set with the junit 3 impl a
> little bit longer and see if we get more random-hard-to-reproduce failures.
>
>
> On Mon, Dec 14, 2009 at 1:46 PM, Erick Erickson <er...@gmail.com>wrote:
>
>> Oooh, nice...
>>
>>
>> On Mon, Dec 14, 2009 at 1:26 PM, <rm...@apache.org> wrote:
>>
>>> Author: rmuir
>>> Date: Mon Dec 14 18:26:26 2009
>>> New Revision: 890427
>>>
>>> URL: http://svn.apache.org/viewvc?rev=890427&view=rev
>>> Log:
>>> LUCENE-2155: add assertion to check if something changes default locale
>>> behind our back when using LocalizedTestCase
>>>
>>> Modified:
>>>
>>>  lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>>>
>>> Modified:
>>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>>> URL:
>>> http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java?rev=890427&r1=890426&r2=890427&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>>> (original)
>>> +++
>>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java Mon
>>> Dec 14 18:26:26 2009
>>> @@ -73,6 +73,8 @@
>>>
>>>   @Override
>>>   protected void tearDown() throws Exception {
>>> +    assertEquals("default locale unexpectedly changed:", locale, Locale
>>> +        .getDefault());
>>>     Locale.setDefault(defaultLocale);
>>>     super.tearDown();
>>>   }
>>>
>>>
>>>
>>
>
>
> --
> Robert Muir
> rcmuir@gmail.com
>

Re: svn commit: r890427 - /lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java

Posted by Robert Muir <rc...@gmail.com>.
yeah i am convinced this is not a problem with your junit 4 patch Erick...
as Uwe ran into the same trouble I ran into with the existing
LocalizedTestCase

however, if you don't mind, I'd like to let it set with the junit 3 impl a
little bit longer and see if we get more random-hard-to-reproduce failures.

On Mon, Dec 14, 2009 at 1:46 PM, Erick Erickson <er...@gmail.com>wrote:

> Oooh, nice...
>
>
> On Mon, Dec 14, 2009 at 1:26 PM, <rm...@apache.org> wrote:
>
>> Author: rmuir
>> Date: Mon Dec 14 18:26:26 2009
>> New Revision: 890427
>>
>> URL: http://svn.apache.org/viewvc?rev=890427&view=rev
>> Log:
>> LUCENE-2155: add assertion to check if something changes default locale
>> behind our back when using LocalizedTestCase
>>
>> Modified:
>>
>>  lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>>
>> Modified:
>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>> URL:
>> http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java?rev=890427&r1=890426&r2=890427&view=diff
>>
>> ==============================================================================
>> ---
>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>> (original)
>> +++
>> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java Mon
>> Dec 14 18:26:26 2009
>> @@ -73,6 +73,8 @@
>>
>>   @Override
>>   protected void tearDown() throws Exception {
>> +    assertEquals("default locale unexpectedly changed:", locale, Locale
>> +        .getDefault());
>>     Locale.setDefault(defaultLocale);
>>     super.tearDown();
>>   }
>>
>>
>>
>


-- 
Robert Muir
rcmuir@gmail.com

Re: svn commit: r890427 - /lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java

Posted by Erick Erickson <er...@gmail.com>.
Oooh, nice...

On Mon, Dec 14, 2009 at 1:26 PM, <rm...@apache.org> wrote:

> Author: rmuir
> Date: Mon Dec 14 18:26:26 2009
> New Revision: 890427
>
> URL: http://svn.apache.org/viewvc?rev=890427&view=rev
> Log:
> LUCENE-2155: add assertion to check if something changes default locale
> behind our back when using LocalizedTestCase
>
> Modified:
>    lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
>
> Modified:
> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
> URL:
> http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java?rev=890427&r1=890426&r2=890427&view=diff
>
> ==============================================================================
> ---
> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java
> (original)
> +++
> lucene/java/trunk/src/test/org/apache/lucene/util/LocalizedTestCase.java Mon
> Dec 14 18:26:26 2009
> @@ -73,6 +73,8 @@
>
>   @Override
>   protected void tearDown() throws Exception {
> +    assertEquals("default locale unexpectedly changed:", locale, Locale
> +        .getDefault());
>     Locale.setDefault(defaultLocale);
>     super.tearDown();
>   }
>
>
>