activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1058927 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
Date Fri, 14 Jan 2011 10:27:25 GMT
Author: gtully
Date: Fri Jan 14 10:27:24 2011
New Revision: 1058927

URL: http://svn.apache.org/viewvc?rev=1058927&view=rev
Log:
get derby to shutdown after each test

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java?rev=1058927&r1=1058926&r2=1058927&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
Fri Jan 14 10:27:24 2011
@@ -49,7 +49,7 @@ public class JDBCMessagePriorityTest ext
         dataSource = new EmbeddedDataSource();
         dataSource.setDatabaseName("derbyDb");
         dataSource.setCreateDatabase("create");
-        dataSource.setShutdownDatabase("false");
+        dataSource.setShutdownDatabase(null);
         jdbc.setDataSource(dataSource);
         jdbc.deleteAllMessages();
         jdbc.setCleanupPeriod(2000);
@@ -60,9 +60,14 @@ public class JDBCMessagePriorityTest ext
     protected void tearDown() throws Exception {
        super.tearDown();
        try {
-           dataSource.setShutdownDatabase("true");
-           dataSource.getConnection();
+            if (dataSource != null) {
+                // ref http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?view=markup
+                dataSource.setShutdownDatabase("shutdown");
+                dataSource.getConnection();
+           }
        } catch (Exception ignored) {
+       } finally {
+            dataSource.setShutdownDatabase(null);
        }
 
     }



Mime
View raw message