db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r892327 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang: Price.java UDTPermsTest.java
Date Fri, 18 Dec 2009 18:10:42 GMT
Author: rhillegas
Date: Fri Dec 18 18:10:42 2009
New Revision: 892327

URL: http://svn.apache.org/viewvc?rev=892327&view=rev
Log:
DERBY-651: Address instability in UDTPermsTest caused by different string representation of
timestamp 0L on different platforms.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDTPermsTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java?rev=892327&r1=892326&r2=892327&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java
Fri Dec 18 18:10:42 2009
@@ -66,7 +66,14 @@
 
     public String toString()
     {
-        return "Price( " + currencyCode + ", " + amount + ", " + timeInstant + " )";
+        StringBuffer buffer = new StringBuffer();
+
+        buffer.append( "Price( " + currencyCode + ", " + amount + ", "  );
+        if ( DEFAULT_TIMESTAMP.equals( timeInstant ) ) { buffer.append( "XXX" ); }
+        else { buffer.append( timeInstant ); }
+        buffer.append( " )" );
+
+        return buffer.toString();
     }
 
     public boolean equals( Object other )

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDTPermsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDTPermsTest.java?rev=892327&r1=892326&r2=892327&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDTPermsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UDTPermsTest.java
Fri Dec 18 18:10:42 2009
@@ -214,7 +214,7 @@
              "select * from ruth.t_ruth_01",
              new String[][]
              {
-                 { "Price( USD, 1, 1969-12-31 16:00:00.0 )" },
+                 { "Price( USD, 1, XXX )" },
              },
              false
              );
@@ -224,7 +224,7 @@
              "values( ruth.makePrice_ruth_01() )\n",
              new String[][]
              {
-                 { "Price( USD, 1, 1969-12-31 16:00:00.0 )" },
+                 { "Price( USD, 1, XXX )" },
              },
              false
              );
@@ -244,7 +244,7 @@
              "select * from t_dbo_01\n",
              new String[][]
              {
-                 { "Price( USD, 1, 1969-12-31 16:00:00.0 )" },
+                 { "Price( USD, 1, XXX )" },
              },
              false
              );
@@ -270,7 +270,7 @@
              "select * from ruth.t_ruth_01",
              new String[][]
              {
-                 { "Price( USD, 1, 1969-12-31 16:00:00.0 )" },
+                 { "Price( USD, 1, XXX )" },
              },
              false
              );
@@ -290,7 +290,7 @@
              "select * from t_alice_01\n",
              new String[][]
              {
-                 { "Price( USD, 1, 1969-12-31 16:00:00.0 )" },
+                 { "Price( USD, 1, XXX )" },
              },
              false
              );



Mime
View raw message