cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r1079849 - /cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java
Date Wed, 09 Mar 2011 15:43:37 GMT
Author: gdusbabek
Date: Wed Mar  9 15:43:37 2011
New Revision: 1079849

URL: http://svn.apache.org/viewvc?rev=1079849&view=rev
Log:
force time zone to eastern in RoundTripTest

Modified:
    cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java?rev=1079849&r1=1079848&r2=1079849&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java Wed Mar 
9 15:43:37 2011
@@ -69,7 +69,7 @@ public class RoundTripTest
         assert LexicalUUIDType.instance.compose(ByteBuffer.wrap(UUIDGen.decompose(uuid))).equals(uuid);
     }
     
-    @Test @Ignore
+    @Test
     public void testTimeUUID()
     {
         UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
@@ -81,7 +81,8 @@ public class RoundTripTest
         
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString(uuid.toString())));
         
-        Calendar c = Calendar.getInstance(TimeZone.getTimeZone("America/Chicago"));
+        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
+        Calendar c = Calendar.getInstance();
         c.set(Calendar.YEAR, 2011);
         c.set(Calendar.MONTH, Calendar.MARCH);
         c.set(Calendar.DAY_OF_MONTH, 8);
@@ -89,7 +90,7 @@ public class RoundTripTest
         c.set(Calendar.MINUTE, 0);
         c.set(Calendar.SECOND, 0);
         c.set(Calendar.MILLISECOND, 0);
-        Long ts = new Long(1299564000000L);
+        Long ts = new Long(1299560400000L);
         assert ts.equals(c.getTimeInMillis()) : c.getTimeInMillis();
         
         // create a uuid with a known time.
@@ -97,14 +98,14 @@ public class RoundTripTest
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString(uuid.toString())));
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00")));
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00:00")));
-        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00-0600")));
-        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00:00-0600")));
+        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00-0500")));
+        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08
00:00:00-0500")));
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00")));
-        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00-0600")));
+        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00-0500")));
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00:00")));
-        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00:00-0600")));
+        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08T00:00:00-0500")));
         assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08")));
-        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08-0600")));
 
+        assert uuid.equals(TimeUUIDType.instance.compose(TimeUUIDType.instance.fromString("2011-03-08-0500")));
 
     }
     
     @Test



Mime
View raw message