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 2013/04/24 09:13:14 UTC
svn commit: r1471266 - in /db/derby/code/branches/10.10: ./
java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Author: kahatlen
Date: Wed Apr 24 07:13:14 2013
New Revision: 1471266
URL: http://svn.apache.org/r1471266
Log:
DERBY-6193: AutomaticIndexStatisticsTest doesn't delete its single-use database
Merged revision 1471264 from trunk.
Modified:
db/derby/code/branches/10.10/ (props changed)
db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
Merged /db/derby/code/trunk:r1471264
Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java?rev=1471266&r1=1471265&r2=1471266&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java (original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java Wed Apr 24 07:13:14 2013
@@ -39,6 +39,7 @@ import junit.framework.TestSuite;
import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
import org.apache.derbyTesting.junit.IndexStatsUtil;
import org.apache.derbyTesting.junit.IndexStatsUtil.IdxStats;
import org.apache.derbyTesting.junit.JDBC;
@@ -75,15 +76,16 @@ public class AutomaticIndexStatisticsTes
}
public static Test suite() {
- TestSuite suite = new TestSuite(AutomaticIndexStatisticsTest.class);
+ Test test = new TestSuite(AutomaticIndexStatisticsTest.class);
+ test = new CleanDatabaseTestSetup(test);
+ test = TestConfiguration.additionalDatabaseDecorator(test, MASTERDB);
+
// DERBY-5964: The test needs to check the timestamp stored in
// SYSSTATISTICS, which is in the local timezone. Since those
// timestamps may be ambiguous around the transition to or from DST,
// run this test in a timezone that doesn't observe DST. The
// TimeZoneTestSetup can probably be removed once DERBY-5974 is fixed.
- return new TimeZoneTestSetup(
- TestConfiguration.additionalDatabaseDecorator(suite, MASTERDB),
- "GMT");
+ return new TimeZoneTestSetup(test, "GMT");
}
/** Initialize the default statistics helper object. */
@@ -240,7 +242,7 @@ public class AutomaticIndexStatisticsTes
/**
* Tests that compressing the table while scanned makes the daemon fail
- * gracefully, and that the daemon can do other work afterwords.
+ * gracefully, and that the daemon can do other work afterwards.
*/
public void testCompressWhileScanning()
throws IOException, SQLException {
@@ -277,6 +279,10 @@ public class AutomaticIndexStatisticsTes
con.prepareStatement("select * from " + TAB2 + " where id = ?");
myStats.assertTableStats(TAB2, 1);
myStats.release();
+
+ // Shutdown database and try to delete it.
+ JDBCDataSource.shutdownDatabase(ds);
+ assertDirectoryDeleted(constructDbPath(db));
}
/**