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 2012/01/25 11:25:21 UTC
svn commit: r1235709 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java
Author: kahatlen
Date: Wed Jan 25 10:25:21 2012
New Revision: 1235709
URL: http://svn.apache.org/viewvc?rev=1235709&view=rev
Log:
DERBY-5580: NativeAuthenticationServiceTest fails to delete databases
Make sure the databases get shut down before attempting to delete them.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java?rev=1235709&r1=1235708&r2=1235709&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java Wed Jan 25 10:25:21 2012
@@ -25,10 +25,9 @@ import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
+import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.apache.derbyTesting.junit.BaseJDBCTestCase;
-import org.apache.derbyTesting.junit.DatabaseChangeSetup;
import org.apache.derbyTesting.junit.JDBC;
import org.apache.derbyTesting.junit.TestConfiguration;
import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
@@ -199,6 +198,16 @@ public class NativeAuthenticationService
{
result = new SystemPropertyTestSetup( result, systemProperties, true );
}
+ else
+ {
+ // DERBY-5580: We should also shut down the engine before deleting
+ // the database if we don't set any system properties.
+ result = new TestSetup(result) {
+ protected void tearDown() {
+ TestConfiguration.getCurrent().shutdownEngine();
+ }
+ };
+ }
//
// Register temporary databases, where the test will do its work.