db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r1798340 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/IdentitySequenceTest.java
Date Sat, 10 Jun 2017 21:52:36 GMT
Author: bpendleton
Date: Sat Jun 10 21:52:35 2017
New Revision: 1798340

URL: http://svn.apache.org/viewvc?rev=1798340&view=rev
Log:
DERBY-6935: Test coverage for added features

This patch was contributed by Harshvardhan Gupta (harshvardhan145 at gmail dot com)

The patch adds additional test cases for the new CYCLE-related features
of the identity column support.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/IdentitySequenceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/IdentitySequenceTest.java?rev=1798340&r1=1798339&r2=1798340&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/IdentitySequenceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/IdentitySequenceTest.java
Sat Jun 10 21:52:35 2017
@@ -711,30 +711,45 @@ public class IdentitySequenceTest extend
              );
 
 	goodStatement( conn, "drop table t" );
-	goodStatement( conn, "create table t( A_6852 int generated always as identity(start with
7 increment by 2 cycle))" );
+	goodStatement( conn, "create table t( A_6852 int generated always as identity(start with
7 increment by 2 cycle), b_6852 int)" );
 		//SELECT from sys.syscolumns with cycle option
+        // ADDING AUTOINCREMENTCYCLE Derby-6905
+
 	assertResults
             (
              conn,
-             "select AUTOINCREMENTVALUE, AUTOINCREMENTSTART, AUTOINCREMENTINC from sys.syscolumns
where COLUMNNAME ='A_6852'",
+             "select AUTOINCREMENTVALUE, AUTOINCREMENTSTART, AUTOINCREMENTINC, AUTOINCREMENTCYCLE
from sys.syscolumns where COLUMNNAME ='A_6852'",
              new String[][]
              {
-                 { "7", "7", "2" },
+                 { "7", "7", "2", "true" },
+             },
+             false
+             );
+
+	assertResults
+            (
+             conn,
+             "select AUTOINCREMENTVALUE, AUTOINCREMENTSTART, AUTOINCREMENTINC, AUTOINCREMENTCYCLE
from sys.syscolumns where COLUMNNAME ='B_6852'",
+             new String[][]
+             {
+                 { null, null, null, "false" },
              },
              false
              );
 
 	goodStatement( conn, "drop table t" );
 		//SELECT from sys.syscolumns without cycle option
-	goodStatement( conn, "create table T_6852( A_6852 int generated always as identity(start
with 7 increment by 2))" );
+        // ADDING AUTOINCREMENTCYCLE Derby-6905
+
+        goodStatement( conn, "create table T_6852( A_6852 int generated always as identity(start
with 7 increment by 2))" );
 
 	assertResults
             (
              conn,
-             "select AUTOINCREMENTVALUE, AUTOINCREMENTSTART, AUTOINCREMENTINC from sys.syscolumns
where COLUMNNAME ='A_6852'",
+             "select AUTOINCREMENTVALUE, AUTOINCREMENTSTART, AUTOINCREMENTINC,  AUTOINCREMENTCYCLE
 from sys.syscolumns where COLUMNNAME ='A_6852'",
              new String[][]
              {
-                 { "7", "7", "2" },
+                 { "7", "7", "2", "false" },
              },
              false
              );



Mime
View raw message