Skip to content

Apache Lucene open-source search software

SOLR-2690: extreme testing paranoia

Chris M. Hostetterdd8202b3ece2
diff --git a/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java b/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java
index f53064ce5ee..47f33f1b493 100644
--- a/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java
+++ b/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java
@@ -62,6 +62,20 @@ public class TimeZoneUtilsTest extends LuceneTestCase {
}
}
+ public void testStupidIKnowButIDontTrustTheJVM() throws Exception {
+
+ for (String input : new String[] {"GMT-00", "GMT+00", "GMT-0", "GMT+0",
+ "GMT+08","GMT+8", "GMT-08","GMT-8",
+ "GMT+0800","GMT+08:00",
+ "GMT-0800","GMT-08:00",
+ "GMT+23", "GMT+2300",
+ "GMT-23", "GMT-2300"}) {
+ assertEquals(input,
+ TimeZone.getTimeZone(input),
+ TimeZone.getTimeZone(input));
+ }
+ }
+
public void testInvalidInput() throws Exception {
final String giberish = "giberish";