Author: tfischer
Date: Tue Oct  8 19:29:12 2013
New Revision: 1530402

URL: http://svn.apache.org/r1530402
Log:
TORQUE-292 fix time zone for test

Modified:
    
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java

Modified: 
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java?rev=1530402&r1=1530401&r2=1530402&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java
 (original)
+++ 
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java
 Tue Oct  8 19:29:12 2013
@@ -72,8 +72,8 @@ public class ChecksumsTest extends BaseT
                 new byte[] {127});
         lastChangesContent.setModificationDate(
                 "name",
-                new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(
-                        "2000-01-01 17:13:16"));
+                new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").parse(
+                        "2000-01-01 17:13:16 GMT"));
         lastChangesContent.setModificationDate(
                 "name - ModDateOnly",
                 new Date(12345L));
@@ -94,16 +94,22 @@ public class ChecksumsTest extends BaseT
         // + "946743196000-00649C01FF-name\n"
         // + "-7F-nameChecksumOnly"
         // where line order may be changed.
-        String expectedLine1 = "946743196000-00649C01FF-name\n";
+        String expectedLine1 = "946746796000-00649C01FF-name\n";
         String expectedLine2 = "-7F-nameChecksumOnly\n";
         String expectedLine3 = "12345--name - ModDateOnly\n";
         assertEquals(expectedLine1.length()
                     + expectedLine2.length()
                     + expectedLine3.length(),
                 fileContent.length());
-        assertTrue(fileContent.contains(expectedLine1));
-        assertTrue(fileContent.contains(expectedLine2));
-        assertTrue(fileContent.contains(expectedLine3));
+        assertTrue(
+                "Content " + fileContent + " should contain " + expectedLine1,
+                fileContent.contains(expectedLine1));
+        assertTrue(
+                "Content " + fileContent + " should contain " + expectedLine2,
+                fileContent.contains(expectedLine2));
+        assertTrue(
+                "Content " + fileContent + " should contain " + expectedLine3,
+                fileContent.contains(expectedLine3));
     }
 
     @Test
@@ -133,8 +139,8 @@ public class ChecksumsTest extends BaseT
                 new byte[] {127},
                 lastChangesContent.getChecksum("nameChecksumOnly"));
         assertEquals(
-                new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(
-                        "2000-01-01 17:13:16"),
+                new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").parse(
+                        "2000-01-01 16:13:16 GMT"),
                 lastChangesContent.getModificationDate("name"));
         assertEquals(
                 new Date(12345L),



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org
For additional commands, e-mail: torque-dev-h...@db.apache.org

Reply via email to