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 ka...@apache.org on 2006/09/12 08:55:45 UTC

svn commit: r442490 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java

Author: kahatlen
Date: Mon Sep 11 23:55:44 2006
New Revision: 442490

URL: http://svn.apache.org/viewvc?view=rev&rev=442490
Log:
DERBY-803: derbynet/DerbyNetAutoStart.java test fails intermittently
with org.apache.derby.iapi.services.context.ShutdownException

Let the test wait between closing client connections and shutting down
the engine. This way, the server threads get time to close the
connections cleanly before the engine is taken down.

Patch contributed by Fernanda Pizzorno.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java?view=diff&rev=442490&r1=442489&r2=442490
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java Mon Sep 11 23:55:44 2006
@@ -634,6 +634,13 @@
             System.out.println( "  Connection close failed:");
             System.out.println( "    " + sqle.getMessage());
         }
+        // DERBY-803: Give the server threads time to finish their close
+        // operations before we shut down the engine. Otherwise, we might get
+        // some (harmless) error messages printed to the console. See also
+        // DERBY-1020.
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException ex) {}
         try
         {
             DriverManager.getConnection( "jdbc:derby:;shutdown=true");