Author: tfischer
Date: Mon Jan 28 21:03:33 2013
New Revision: 1439631

URL: http://svn.apache.org/viewvc?rev=1439631&view=rev
Log:
mssql cannot insert predefined primary keys, skip test

Modified:
    
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DataTest.java

Modified: 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DataTest.java
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DataTest.java?rev=1439631&r1=1439630&r2=1439631&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DataTest.java
 (original)
+++ 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DataTest.java
 Mon Jan 28 21:03:33 2013
@@ -890,6 +890,11 @@ public class DataTest extends BaseDataba
      */
     public void testLargePk() throws Exception
     {
+        if (defaultAdapter instanceof MssqlAdapter) {
+            log.error("testLargePk(): "
+                    + "MSSQL does not support inserting defined PK values");
+                return;
+        }
         BigintTypePeer.doDelete(new Criteria());
 
         long longId = 8771507845873286l;
@@ -904,6 +909,25 @@ public class DataTest extends BaseDataba
     }
 
     /**
+     * tests whether large bigint values are inserted and read correctly
+     * @throws Exception if the test fails
+     */
+    public void testLargeValue() throws Exception
+    {
+        BigintTypePeer.doDelete(new Criteria());
+
+        long longValue = 8771507845873286l;
+        BigintType bigintType = new BigintType();
+        bigintType.setBigintValue(longValue);
+        bigintType.save();
+
+        List<BigintType> bigintTypeList = BigintTypePeer.doSelect(new 
Criteria());
+        BigintType readBigintType = bigintTypeList.get(0);
+        assertEquals(bigintType.getId(), readBigintType.getId());
+        assertEquals(longValue, readBigintType.getBigintValue());
+    }
+
+    /**
      * Tests the CountHelper class
      * @throws Exception if the test fails
      */



---------------------------------------------------------------------
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