db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [PATCH] Some small test change for Network Server
Date Fri, 22 Apr 2005 22:05:31 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Committed this patch.<br>
<br>
Satheesh<br>
<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\harness\Sed.java<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\holdCursorIJ.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\scrollCursors1.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\holdCursorIJ.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\scrollCursors1.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\holdCursorIJ.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\scrollCursors1.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\tests\lang\holdCursorIJ.sql<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\tests\lang\scrollCursors1.sql<br>
Transmitting file data .........<br>
Committed revision 164284.<br>
[bandaram:satheesh]<br>
<br>
Army wrote:<br>
<blockquote cite="mid42696CDD.600@sbcglobal.net" type="cite">Attached
is a small patch that does the following two things:
  <br>
  <br>
1) Changes the "lang/holdCursorIJ.sql" and "lang/scrollCursors1.sql"
tests to clean up after each test case (by closing any opened
cursors).&nbsp; Without this cleanup, some later versions of JCC can show
false failures for these two tests.
  <br>
  <br>
2) Adds a "sed" filter to the harness that will filter out some
unwanted JCC text that can be appended to certain error messages.&nbsp; This
text isn't related to the actual errors in question and thus looks to
be irrelevant.&nbsp; By filtering it out, we can avoid some false failures
that can occur with later versions of JCC.
  <br>
  <br>
Could a committer please commit?
  <br>
  <br>
Thanks,
  <br>
Army
  <br>
  <pre wrap="">
<hr size="4" width="90%">
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors1.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors1.sql	(revision
164154)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors1.sql	(working
copy)
@@ -233,6 +233,7 @@
 update t1 set i = 666 where i = 2;
 first c1;
 rollback;
+close c1;
 
 -- verify that statement cache works
 -- correctly with scroll and forward only
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorIJ.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorIJ.sql	(revision
164154)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorIJ.sql	(working
copy)
@@ -34,6 +34,10 @@
 close jdk4;
 next jdk4;
 
+-- clean up.
+close jdk1;
+close jdk2;
+
 -- second test - make sure that all the cursors (including holdability true)
 -- have their resultsets closed after rollback.
 
@@ -56,6 +60,11 @@
 next jdk2;
 next jdk4;
 
+-- clean up.
+close jdk1;
+close jdk2;
+close jdk4;
+
 -- third test - Define a hold cursor on a table. Shouldn't be able to drop that
 -- table before &amp; after commit. Have to close the cursor before table can be dropped.

@@ -74,6 +83,9 @@
 close jdk4;
 drop table t1;
 
+-- clean up.
+close jdk1;
+
 -- recreate and populate the table for next test
 create table t1(c11 int, c12 int);
 insert into t1 values(1,1);
@@ -98,6 +110,9 @@
 close jdk4;
 set isolation to serializable;
 
+-- clean up.
+close jdk1;
+
 -- fifth test - try isolation level change alongwith changing the isolation
 -- level of just one statement
 get with hold cursor jdk4 as 'SELECT * FROM t1';
@@ -113,6 +128,9 @@
 set isolation READ UNCOMMITTED;
 set isolation RS;
 
+-- clean up.
+close jdk1;
+
 -- sixth test - try positioned update with hold cursor
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 -- following should give error because cursor is not positioned on any row
@@ -186,5 +204,8 @@
 next scrollCursor;
 update t1 set c12=c12+1 where current of scrollCursor;
 
+-- clean up.
+close scrollCursor;
 
 
+
Index: java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java	(revision 164154)
+++ java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java	(working copy)
@@ -178,6 +178,10 @@
 		//Filter to suppress absould paths in error message for roll forward recovery tests 
 		searchStrings.addElement("Directory.*.wombat.already.exists");
 
+        // Filter for "DB2ConnectionCorrelator" text that can be printed as
+        // part of some JCC error messages.
+        searchStrings.addElement("  DB2ConnectionCorrelator: [0-9A-Z.]*");
+
         Vector subStrings = new Vector();
         subStrings.addElement("");
         subStrings.addElement("");
@@ -222,6 +226,8 @@
 			subStrings.addElement("-----");
 		}
 		subStrings.addElement("Directory DBLOCATION/wombat already exists");
+		// ignore the 'DB2ConnectionCorrelator' thing altogether.
+		subStrings.addElement("");
 		doWork(srcFile, dstFile, null, deleteLines, searchStrings, subStrings, isSed, isI18N);
 
 	}
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/scrollCursors1.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/scrollCursors1.out
(revision 164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/scrollCursors1.out
(working copy)
@@ -408,6 +408,7 @@
 -----
 2          
 ij&gt; rollback;
+ij&gt; close c1;
 ij&gt; -- verify that statement cache works
 ----- correctly with scroll and forward only
 ----- cursors on same query text
@@ -561,7 +562,7 @@
 1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                    
 -----
 Statement Name: 
-	SQL_CURSH200C3
+	SQL_CURSH200C2
 Statement Text: 
 	select * from t1
 Parse Time: 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorIJ.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorIJ.out	(revision
164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorIJ.out	(working
copy)
@@ -45,6 +45,9 @@
 ij&gt; close jdk4;
 ij&gt; next jdk4;
 IJ ERROR: Unable to establish cursor
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
 ij&gt; -- second test - make sure that all the cursors (including holdability true)
 ----- have their resultsets closed after rollback.
 ----- declare the cursors again, this time, try with rollback
@@ -74,6 +77,10 @@
 ERROR (no SQLState): Invalid operation: result set closed
 ij&gt; next jdk4;
 ERROR (no SQLState): Invalid operation: result set closed
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
+ij&gt; close jdk4;
 ij&gt; -- third test - Define a hold cursor on a table. Shouldn't be able to drop that
 ----- table before &amp; after commit. Have to close the cursor before table can be dropped.
 get with nohold cursor jdk1 as 'SELECT * FROM t1';
@@ -97,6 +104,8 @@
 close jdk4;
 ij&gt; drop table t1;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- recreate and populate the table for next test
 create table t1(c11 int, c12 int);
 0 rows inserted/updated/deleted
@@ -127,6 +136,8 @@
 close jdk4;
 ij&gt; set isolation to serializable;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- fifth test - try isolation level change alongwith changing the isolation
 ----- level of just one statement
 get with hold cursor jdk4 as 'SELECT * FROM t1';
@@ -151,11 +162,13 @@
 0 rows inserted/updated/deleted
 ij&gt; set isolation RS;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- sixth test - try positioned update with hold cursor
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 ij&gt; -- following should give error because cursor is not positioned on any row
 update t1 set c12=12 where current of jdk4;
-ERROR XCL08: Cursor 'SQL_CURSH200C2' is not on a row.
+ERROR XCL08: Cursor 'SQL_CURSH200C1' is not on a row.
 ij&gt; select * from t1;
 C11 |C12        
 -----
@@ -205,7 +218,7 @@
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 ij&gt; -- following should give error because cursor is not positioned on any row
 delete from t1 where current of jdk4;
-ERROR XCL08: Cursor 'SQL_CURSH200C2' is not on a row.
+ERROR XCL08: Cursor 'SQL_CURSH200C1' is not on a row.
 ij&gt; select * from t1;
 C11 |C12        
 -----
@@ -297,4 +310,6 @@
 1 |1          
 ij&gt; update t1 set c12=c12+1 where current of scrollCursor;
 1 row inserted/updated/deleted
+ij&gt; -- clean up.
+close scrollCursor;
 ij&gt; 
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors1.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors1.out
(revision 164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors1.out
(working copy)
@@ -408,6 +408,7 @@
 -----
 2          
 ij&gt; rollback;
+ij&gt; close c1;
 ij&gt; -- verify that statement cache works
 ----- correctly with scroll and forward only
 ----- cursors on same query text
@@ -561,7 +562,7 @@
 1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                    
 -----
 Statement Name: 
-	SQL_CURLH000C3
+	SQL_CURLH000C2
 Statement Text: 
 	select * from t1
 Parse Time: 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
(revision 164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
(working copy)
@@ -45,6 +45,9 @@
 ij&gt; close jdk4;
 ij&gt; next jdk4;
 IJ ERROR: Unable to establish cursor
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
 ij&gt; -- second test - make sure that all the cursors (including holdability true)
 ----- have their resultsets closed after rollback.
 ----- declare the cursors again, this time, try with rollback
@@ -74,6 +77,10 @@
 ERROR (no SQLState): Invalid operation: result set closed
 ij&gt; next jdk4;
 ERROR (no SQLState): Invalid operation: result set closed
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
+ij&gt; close jdk4;
 ij&gt; -- third test - Define a hold cursor on a table. Shouldn't be able to drop that
 ----- table before &amp; after commit. Have to close the cursor before table can be dropped.
 get with nohold cursor jdk1 as 'SELECT * FROM t1';
@@ -97,6 +104,8 @@
 close jdk4;
 ij&gt; drop table t1;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- recreate and populate the table for next test
 create table t1(c11 int, c12 int);
 0 rows inserted/updated/deleted
@@ -127,6 +136,8 @@
 close jdk4;
 ij&gt; set isolation to serializable;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- fifth test - try isolation level change alongwith changing the isolation
 ----- level of just one statement
 get with hold cursor jdk4 as 'SELECT * FROM t1';
@@ -151,11 +162,13 @@
 0 rows inserted/updated/deleted
 ij&gt; set isolation RS;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- sixth test - try positioned update with hold cursor
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 ij&gt; -- following should give error because cursor is not positioned on any row
 update t1 set c12=12 where current of jdk4;
-ERROR XCL08: Cursor 'SQL_CURLH000C7' is not on a row.
+ERROR XCL08: Cursor 'SQL_CURLH000C1' is not on a row.
 ij&gt; select * from t1;
 C11 |C12        
 -----
@@ -205,7 +218,7 @@
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 ij&gt; -- following should give error because cursor is not positioned on any row
 delete from t1 where current of jdk4;
-ERROR XCL08: Cursor 'SQL_CURLH000C7' is not on a row.
+ERROR XCL08: Cursor 'SQL_CURLH000C1' is not on a row.
 ij&gt; select * from t1;
 C11 |C12        
 -----
@@ -297,4 +310,6 @@
 1 |1          
 ij&gt; update t1 set c12=c12+1 where current of scrollCursor;
 1 row inserted/updated/deleted
+ij&gt; -- clean up.
+close scrollCursor;
 ij&gt; 
Index: java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors1.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors1.out	(revision
164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors1.out	(working
copy)
@@ -408,6 +408,7 @@
 -----------
 2          
 ij&gt; rollback;
+ij&gt; close c1;
 ij&gt; -- verify that statement cache works
 -- correctly with scroll and forward only
 -- cursors on same query text
Index: java/testing/org/apache/derbyTesting/functionTests/master/holdCursorIJ.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/holdCursorIJ.out	(revision 164154)
+++ java/testing/org/apache/derbyTesting/functionTests/master/holdCursorIJ.out	(working copy)
@@ -45,6 +45,9 @@
 ij&gt; close jdk4;
 ij&gt; next jdk4;
 IJ ERROR: Unable to establish cursor
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
 ij&gt; -- second test - make sure that all the cursors (including holdability true)
 -- have their resultsets closed after rollback.
 -- declare the cursors again, this time, try with rollback
@@ -74,6 +77,10 @@
 ERROR XCL16: ResultSet not open, operation 'next' not permitted. Verify that autocommit is
OFF.
 ij&gt; next jdk4;
 ERROR XCL16: ResultSet not open, operation 'next' not permitted. Verify that autocommit is
OFF.
+ij&gt; -- clean up.
+close jdk1;
+ij&gt; close jdk2;
+ij&gt; close jdk4;
 ij&gt; -- third test - Define a hold cursor on a table. Shouldn't be able to drop that
 -- table before &amp; after commit. Have to close the cursor before table can be dropped.
 get with nohold cursor jdk1 as 'SELECT * FROM t1';
@@ -97,6 +104,8 @@
 close jdk4;
 ij&gt; drop table t1;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- recreate and populate the table for next test
 create table t1(c11 int, c12 int);
 0 rows inserted/updated/deleted
@@ -127,6 +136,8 @@
 close jdk4;
 ij&gt; set isolation to serializable;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- fifth test - try isolation level change alongwith changing the isolation
 -- level of just one statement
 get with hold cursor jdk4 as 'SELECT * FROM t1';
@@ -151,6 +162,8 @@
 0 rows inserted/updated/deleted
 ij&gt; set isolation RS;
 0 rows inserted/updated/deleted
+ij&gt; -- clean up.
+close jdk1;
 ij&gt; -- sixth test - try positioned update with hold cursor
 get with hold cursor jdk4 as 'SELECT * FROM t1 FOR UPDATE';
 ij&gt; -- following should give error because cursor is not positioned on any row
@@ -297,4 +310,6 @@
 1          |1          
 ij&gt; update t1 set c12=c12+1 where current of scrollCursor;
 ERROR 24000: Invalid cursor state - no current row.
+ij&gt; -- clean up.
+close scrollCursor;
 ij&gt; 
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message