You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by bp...@apache.org on 2006/05/16 01:34:29 UTC

svn commit: r406776 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/DerbyNetClient/checkDataSource.out master/DerbyNetClient/checkDataSource30.out suites/DerbyNetClient.exclude tests/jdbcapi/checkDataSource.java

Author: bpendleton
Date: Mon May 15 16:34:28 2006
New Revision: 406776

URL: http://svn.apache.org/viewcvs?rev=406776&view=rev
Log:
DERBY-1219: jdbcapi/checkDataSource test hangs intermittently with client

This patch contributed by Deepa Remesh (dremesh@gmail.com).

This patch enables the checkDataSource and checkDataSource30 tests to
run with the client framework by removing the code which shuts down
the system in the middle of the test. This is the code which causes
the intermediate hang.

The hanging problem has been logged as a separate issue, DERBY-1326.

The shutdown is a valuable part of the test because it verifies that the
global transaction state is valid even after the database has been shut
down, so once the hang problem has been resolved, this test should be
modified again to re-enable the shutdown processing with the client framework.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out?rev=406776&r1=406775&r2=406776&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out Mon May 15 16:34:28 2006
@@ -8,7 +8,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() null - Invalid operation: statement closed
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DataSource
   isolation level 2
   auto commit     true
@@ -20,7 +20,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() null - Invalid operation: statement closed
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -36,7 +36,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -52,11 +52,11 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
-expected java.sql.SQLException: 'ResultSet' already closed.
-expected java.sql.SQLException: Invalid operation: statement closed
+expected java.sql.SQLException: ResultSet not open.  Verify that autocommit is OFF.
+expected java.sql.SQLException: No current connection.
 Start testPoolReset ConnectionPoolDataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
@@ -77,7 +77,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
 Start testPoolReset XADataSource
@@ -85,7 +85,6 @@
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
 End testPoolReset XADataSource
-ERROR XJ015: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ015, SQLERRMC: Derby system shutdown.
 Running connection checks on DriverManager 
   isolation level 2
   auto commit     true
@@ -96,7 +95,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() null - Invalid operation: statement closed
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on DataSource
   isolation level 2
   auto commit     true
@@ -108,7 +107,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() null - Invalid operation: statement closed
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -124,7 +123,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
@@ -140,7 +139,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on XADataSource
   isolation level 2
   auto commit     true
@@ -156,7 +155,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on XADataSource
   isolation level 2
   auto commit     true
@@ -172,7 +171,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 EVENT(5):connectionClosed
 Running connection checks on Global XADataSource
   isolation level 2
@@ -188,7 +187,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
@@ -203,7 +202,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
@@ -219,7 +218,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
@@ -235,7 +234,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
@@ -251,7 +250,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
@@ -267,7 +266,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 initial local
   isolation level READ_COMMITTED
   auto commit     true
@@ -457,7 +456,7 @@
 conn4 autcommit true
 acxs 1
 acxs 2
-autocommitxastart expected 'ResultSet' already closed.
+autocommitxastart expected ResultSet not open.  Verify that autocommit is OFF.
 acxs 1
 acxs 2
 autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(), Server returned XAER_OUTSIDE

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out?rev=406776&r1=406775&r2=406776&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out Mon May 15 16:34:28 2006
@@ -11,7 +11,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() null - Invalid operation: statement closed
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -26,7 +26,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() null - Invalid operation: statement closed
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -45,7 +45,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -64,11 +64,11 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
-expected java.sql.SQLException: 'ResultSet' already closed.
-expected java.sql.SQLException: Invalid operation: statement closed
+expected java.sql.SQLException: ResultSet not open.  Verify that autocommit is OFF.
+expected java.sql.SQLException: No current connection.
 Start testPoolReset ConnectionPoolDataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
@@ -92,7 +92,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
 Start testPoolReset XADataSource
@@ -100,7 +100,6 @@
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
 End testPoolReset XADataSource
-ERROR XJ015: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ015, SQLERRMC: Derby system shutdown.
 Running JDBC 3.0 connection checks on DriverManager 
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -114,7 +113,7 @@
 method calls on a closed connection
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
-DriverManager  <closedstmt>.execute() null - Invalid operation: statement closed
+DriverManager  <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -129,7 +128,7 @@
 method calls on a closed connection
 DataSource <closedconn>.close() no error
 DataSource <closedconn>.createStatement() 08003 - No current connection.
-DataSource <closedstmt>.execute() null - Invalid operation: statement closed
+DataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -148,7 +147,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -167,7 +166,7 @@
 method calls on a closed connection
 ConnectionPoolDataSource <closedconn>.close() no error
 ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
-ConnectionPoolDataSource <closedstmt>.execute() null - Invalid operation: statement closed
+ConnectionPoolDataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -186,7 +185,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -205,7 +204,7 @@
 method calls on a closed connection
 XADataSource <closedconn>.close() no error
 XADataSource <closedconn>.createStatement() 08003 - No current connection.
-XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+XADataSource <closedstmt>.execute() 08003 - No current connection.
 EVENT(5):connectionClosed
 Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
@@ -224,7 +223,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -242,7 +241,7 @@
 method calls on a closed connection
 Global XADataSource <closedconn>.close() no error
 Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -261,7 +260,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -280,7 +279,7 @@
 method calls on a closed connection
 Switch to local XADataSource <closedconn>.close() no error
 Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to local XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to local XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -299,7 +298,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint java.sql.SQLException: Cannot issue savepoint when autoCommit is on.
@@ -318,7 +317,7 @@
 method calls on a closed connection
 Switch to global XADataSource <closedconn>.close() no error
 Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
-Switch to global XADataSource <closedstmt>.execute() null - Invalid operation: statement closed
+Switch to global XADataSource <closedstmt>.execute() 08003 - No current connection.
 initial local
   holdability     true
   isolation level READ_COMMITTED
@@ -552,7 +551,7 @@
 conn4 autcommit true
 acxs 1
 acxs 2
-autocommitxastart expected 'ResultSet' already closed.
+autocommitxastart expected ResultSet not open.  Verify that autocommit is OFF.
 acxs 1
 acxs 2
 autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(), Server returned XAER_OUTSIDE
@@ -584,7 +583,7 @@
 X@1 id 1
 X@2 id 2
 Expected SQLException No current connection. : 
-Expected SQLException 'ResultSet' already closed.
+Expected SQLException ResultSet not open.  Verify that autocommit is OFF.
 resume XA transaction and keep using rs
 Check holdability of various jdbc objects after resuming XA transaction
 CONNECTION(xa) HOLDABILITY false
@@ -596,8 +595,8 @@
 STATEMENT(this one was created with default holdability after the global transaction was resumed. Check it's holdability) HOLDABILITY false
 PREPAREDSTATEMENT(this one was created with default holdability after the global transaction was resumed. Check it's holdability) HOLDABILITY false
 CALLABLESTATEMENT(this one was created with default holdability after the global transaction was resumed. Check it's holdability) HOLDABILITY false
-Expected SQLException 'ResultSet' already closed.
-Expected SQLException 'ResultSet' already closed.
+Expected SQLException ResultSet not open.  Verify that autocommit is OFF.
+Expected SQLException ResultSet not open.  Verify that autocommit is OFF.
 Set connection to hold 
 CONNECTION(held) HOLDABILITY true
 **Test holdability state for: PooledConnection **

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude?rev=406776&r1=406775&r2=406776&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude Mon May 15 16:34:28 2006
@@ -23,7 +23,3 @@
 largedata/LobLimits.java
 jdbc4/TestDbMetaData.java
 jdbc4/TestJDBC40Exception.java
-#temporarily disable checkDataSourceTests with client
-#failing (hanging?)  on jdk 1.5/jdk 1.6
-jdbcapi/checkDataSource.java
-jdbcapi/checkDataSource30.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java?rev=406776&r1=406775&r2=406776&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java Mon May 15 16:34:28 2006
@@ -94,6 +94,11 @@
 	
 	// DERBY-1183 getCursorName not correct after first statement execution
 	private static boolean hasGetCursorNameBug = TestUtil.isDerbyNetClientFramework();
+	
+    // DERBY-1326 - Network server may abandon sessions when Derby system is shutdown
+    // and this causes intermittent hangs in the client
+	private static boolean hangAfterSystemShutdown = TestUtil.isDerbyNetClientFramework();
+
 	/**
      * A hashtable of opened connections.  This is used when checking to
      * make sure connection strings are unique; we need to make sure all
@@ -293,11 +298,13 @@
 		testPoolReset("XADataSource", dsx.getXAConnection());
 
 
-
-		try {
-			TestUtil.getConnection("","shutdown=true");
-		} catch (SQLException sqle) {
-			JDBCDisplayUtil.ShowSQLException(System.out, sqle);
+		// DERBY-1326 - hang in client after Derby system shutdown
+		if(! hangAfterSystemShutdown) {
+			try {
+				TestUtil.getConnection("","shutdown=true");
+			} catch (SQLException sqle) {
+				JDBCDisplayUtil.ShowSQLException(System.out, sqle);
+			}
 		}
 
 		dmc = ij.startJBMS();