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 rh...@apache.org on 2011/02/11 18:02:24 UTC
svn commit: r1069890 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java
Author: rhillegas
Date: Fri Feb 11 17:02:23 2011
New Revision: 1069890
URL: http://svn.apache.org/viewvc?rev=1069890&view=rev
Log:
DERBY-5025: Disable the automatic calculation of statistics when running UpdateStatisticsTest.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java?rev=1069890&r1=1069889&r2=1069890&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UpdateStatisticsTest.java Fri Feb 11 17:02:23 2011
@@ -27,6 +27,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import junit.framework.Test;
import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
import org.apache.derbyTesting.junit.IndexStatsUtil;
import org.apache.derbyTesting.junit.JDBC;
import org.apache.derbyTesting.junit.TestConfiguration;
@@ -44,14 +45,17 @@ public class UpdateStatisticsTest extend
}
public static Test suite() {
- // TODO: Disable automatic index statistics generation when the feature
- // is added. As currently planned, the generation will be
+ // Disable automatic index statistics generation. The generation will be
// triggered when preparing a statement and this will interfere
// with some of the asserts in testUpdateStatistics.
// With automatic generation enabled, testUpdateStatistics may
- // fail intermittently due to timing, mostly (only?) when run
+ // fail intermittently due to timing, mostly when run
// with the client driver.
- return TestConfiguration.defaultSuite(UpdateStatisticsTest.class);
+ Test test = TestConfiguration.defaultSuite(UpdateStatisticsTest.class);
+ Test statsDisabled = DatabasePropertyTestSetup.singleProperty
+ ( test, "derby.storage.indexStats.auto", "false", true );
+
+ return statsDisabled;
}
/**