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 da...@apache.org on 2009/12/09 18:25:28 UTC

svn commit: r888881 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java

Author: dag
Date: Wed Dec  9 17:25:28 2009
New Revision: 888881

URL: http://svn.apache.org/viewvc?rev=888881&view=rev
Log:
DERBY-4463 JMX test in nightly test suite failed with: JMXTest:clientjava.lang.InterruptedException:

Patch derby-4463.diff, which moves the clearing of the interrupted
flag in Derby151Test to the teardown method of the test so it will
always be performed.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java?rev=888881&r1=888880&r2=888881&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby151Test.java Wed Dec  9 17:25:28 2009
@@ -98,6 +98,13 @@
     protected void tearDown()
             throws java.lang.Exception {
 
+        // Clearing the interrupt flag; makes sense for embedded part of
+        // the test. When running c/s, it would be the server thread which
+        // receives the interrupt, and since db is shut down, that should
+        // be ok for later tests. We need to clear the flag here since, for
+        // embedded, the app thread is affected.
+        Thread.currentThread().interrupted();
+
         Statement stmt = createStatement();
         stmt.executeUpdate("DROP TABLE d151");
         stmt.close();
@@ -150,12 +157,6 @@
             println("Not able to test fix for DERBY-151: No interrupt seen");
         } catch (SQLException e) {
             assertSQLState("XSDG9", e);
-            // Clearing the interrupt flag; makes sense for embedded part of
-            // the test. When running c/s, it would be the server thread which
-            // receives the interrupt, and since db is shut down, that should
-            // be ok for later tests. We need to clear the flag here since, for
-            // embedded, the app thread is affected.
-            Thread.currentThread().interrupted();
         }
     }
 }