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 km...@apache.org on 2009/10/05 23:32:08 UTC

svn commit: r822027 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java

Author: kmarsden
Date: Mon Oct  5 21:32:08 2009
New Revision: 822027

URL: http://svn.apache.org/viewvc?rev=822027&view=rev
Log:
DERBY-4149 test failure in jdbcapi.InternationalConnectSimpleDSTest fixture testSimpleDSConnect on IBM iseries - Database '?' not found.

Fix the test so that it cleans up the database directory even if connection fails.  This does not correct the actual test failure, just the cleanup.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java?rev=822027&r1=822026&r2=822027&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectSimpleDSTest.java Mon Oct  5 21:32:08 2009
@@ -91,13 +91,11 @@
     }
     
     public void tearDown() {
-        DataSource ds = JDBCDataSource.getDataSource("\u4e10");
-        JDBCDataSource.setBeanProperty(ds, "shutdownDatabase", "shutdown");
-        try {
-            ds.getConnection();
-        } catch (SQLException se) {
-            // ignore shutdown exception 
-        }
+    	// Shutdown Derby before trying to remove the db.
+    	// Because of  DERBY-4149, just shutting down the database
+    	// is not good enough because it will fail and the 
+    	// directory won't be removed.    	
+        TestConfiguration.getCurrent().shutdownEngine();    	               
         removeDirectory(getSystemProperty("derby.system.home") +
                 File.separator + "\u4e10");
     }