You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/10/02 04:25:34 UTC

svn commit: r293059 - in /beehive/trunk/system-controls/test/src/jdbc: controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java

Author: ekoneil
Date: Sat Oct  1 19:25:31 2005
New Revision: 293059

URL: http://svn.apache.org/viewcvs?rev=293059&view=rev
Log:
Remove the MST timezone dependence from the JdbcControl tests.

Contribution from Chad Schoettger.

BB: self
Test: system-controls pass


Modified:
    beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx
    beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java

Modified: beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx?rev=293059&r1=293058&r2=293059&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx (original)
+++ beehive/trunk/system-controls/test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/ResultsTestCtrl.jcx Sat Oct  1 19:25:31 2005
@@ -26,7 +26,6 @@
 import java.util.Iterator;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Date;
 import java.math.BigDecimal;
 
 import org.apache.beehive.controls.system.jdbc.JdbcControl;
@@ -494,7 +493,7 @@
     // date
     //
     @SQL(statement="SELECT dt FROM basic_types")
-    public Date getDateValue();
+    public java.sql.Date getDateValue();
 
     //
     // time
@@ -506,8 +505,6 @@
     // timestamp
     //
     @SQL(statement="SELECT ts FROM basic_types")
-    public Date getTimestampValue();
-
-
+    public java.sql.Timestamp getTimestampValue();
 }
 

Modified: beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java?rev=293059&r1=293058&r2=293059&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java (original)
+++ beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java Sat Oct  1 19:25:31 2005
@@ -36,7 +36,6 @@
 import java.sql.Statement;
 import java.sql.Time;
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * Tests dbcontrol results for single row result sets
@@ -94,7 +93,7 @@
            + "'c', 'chararray', 'varcharvalue', 'longvarcharvalue',"
            + "X'DE', X'bcff', X'aacc',"
            + "32767, 2147483647, 9223372036854775807, 3.402E+38, 1.79769E+308,"
-           + "123.4567, 123.4567, '2005-02-23', '09:45:13', TIMESTAMP('2005-02-23 09:46:17'))");
+           + "123.4567, 123.4567, '2004-02-26', '09:45:13', TIMESTAMP('2005-02-23 09:46:17'))");
         s.executeUpdate(sqlStr.toString());
         conn = null;
     }
@@ -261,8 +260,8 @@
     // test date
     //
     public void testDate() throws Exception {
-        Date d = testCtrl.getDateValue();
- // We may not be MST, assertion is commented out.       assertEquals("Wed Feb 23 00:00:00 MST 2005", d.toString());
+        java.sql.Date d = testCtrl.getDateValue();
+        assertEquals("2004-02-26", d.toString());
     }
 
     //
@@ -277,8 +276,8 @@
     // test timestamp
     //
     public void testTimestamp() throws Exception {
-        Date d = testCtrl.getTimestampValue();
-		 // We may not be MST, assertion is commented out.       assertEquals("Wed Feb 23 09:46:17 MST 2005", d.toString());
+        java.sql.Timestamp ts = testCtrl.getTimestampValue();
+        assertEquals("2005-02-23 09:46:17.0", ts.toString());
     }
 
     public void testBlob() throws Exception {