Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-2155: add assertion to check if something changes default locale behind our back when using LocalizedTestCase

Robert Muirc67b43ef3495
diff --git a/src/test/org/apache/lucene/util/LocalizedTestCase.java b/src/test/org/apache/lucene/util/LocalizedTestCase.java
index 92fb2722351..b3ee63f494c 100644
--- a/src/test/org/apache/lucene/util/LocalizedTestCase.java
+++ b/src/test/org/apache/lucene/util/LocalizedTestCase.java
@@ -73,6 +73,8 @@ public abstract class LocalizedTestCase extends LuceneTestCase {
@Override
protected void tearDown() throws Exception {
+ assertEquals("default locale unexpectedly changed:", locale, Locale
+ .getDefault());
Locale.setDefault(defaultLocale);
super.tearDown();
}