db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r629894 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/jdbc4/ functionTests/tests/jdbcapi/ functionTests/tests/lang/ functionTests/tests/upgradeTests/ junit/
Date Thu, 21 Feb 2008 17:52:55 GMT
Author: kristwaa
Date: Thu Feb 21 09:52:49 2008
New Revision: 629894

URL: http://svn.apache.org/viewvc?rev=629894&view=rev
Log:
DERBY-3306 (+DERBY-3412): jdbc4.StatementEventsTest cannot be run individually in a clean
environment.
This commit backs out the previous patch committed for this issue (revision 620480). Manual
work was required because J2EEDataSourceTest has been split off DataSourceTest in the mean
time.
This patch also fixes StatementEventsTest by setting the createDatabase to create.
Patch file: derby-3306-2a-backout_and_alternative_fix.diff

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementEventsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PoolXADSCreateShutdownDBTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementEventsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementEventsTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementEventsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementEventsTest.java
Thu Feb 21 09:52:49 2008
@@ -118,10 +118,12 @@
     public void setUp() throws SQLException {
         if (xa) {
             XADataSource ds = J2EEDataSource.getXADataSource();
+            J2EEDataSource.setBeanProperty(ds, "createDatabase", "create");
             pooledConnection = ds.getXAConnection();
         } else {
             ConnectionPoolDataSource ds =
                 J2EEDataSource.getConnectionPoolDataSource();
+            J2EEDataSource.setBeanProperty(ds, "createDatabase", "create");
             pooledConnection = ds.getPooledConnection();
         }
         StatementEventListener listener = new StatementEventListener() {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
Thu Feb 21 09:52:49 2008
@@ -226,7 +226,6 @@
     public void testJira95ds() throws SQLException {
         try {
             DataSource ds = JDBCDataSource.getDataSource();
-            JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
             // non-existent database
             JDBCDataSource.setBeanProperty(ds, "databaseName", "jdbc:derby:wombat");
             ds.getConnection();
@@ -361,7 +360,6 @@
 
         // DataSource
         DataSource ds = JDBCDataSource.getDataSource();
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
 
         // DataSource - setTransationAttributes
         traceFile = "trace1.out";
@@ -811,4 +809,4 @@
         // Now close the connections
         clearConnections();
     }
-}
\ No newline at end of file
+}

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
Thu Feb 21 09:52:49 2008
@@ -440,7 +440,6 @@
         String bootPassword="12345678";
         DataSource ds = JDBCDataSource.getDataSource();
 
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
         JDBCDataSource.setBeanProperty(ds, "connectionAttributes",
                                        "dataEncryption=true;bootPassword=" +
                                            bootPassword);
@@ -498,7 +497,6 @@
         String newBootPassword="87654321";
         DataSource ds = JDBCDataSource.getDataSource();
 
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
         JDBCDataSource.setBeanProperty(ds, "connectionAttributes",
                                        "bootPassword=" + bootPassword +
                                        ";newBootPassword=" + newBootPassword);
@@ -698,8 +696,6 @@
         String password = getTestConfiguration().getUserPassword();
 
         DataSource ds = JDBCDataSource.getDataSource();
-
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
         JDBCDataSource.setBeanProperty(
             ds, "connectionAttributes", "upgrade=true");
         JDBCDataSource.setBeanProperty(ds, "user", user);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
Thu Feb 21 09:52:49 2008
@@ -837,7 +837,6 @@
             assertTenConnectionsUnique();
 
         DataSource dscs = JDBCDataSource.getDataSource();
-        JDBCDataSource.setBeanProperty(dscs, "createDatabase", "false");
         if (usingEmbedded()) 
                 assertToString(dscs);
 
@@ -890,7 +889,6 @@
         aes1.resetState();
 
         XADataSource dsx = J2EEDataSource.getXADataSource();
-        JDBCDataSource.setBeanProperty(dsx, "createDatabase", "false");
 
         if (usingEmbedded())
             assertToString(dsx);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PoolXADSCreateShutdownDBTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PoolXADSCreateShutdownDBTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PoolXADSCreateShutdownDBTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PoolXADSCreateShutdownDBTest.java
Thu Feb 21 09:52:49 2008
@@ -172,7 +172,6 @@
         assertUpdateCount(createStatement(), 0, "set schema APP");
    
         // check that first the value is null
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
         assertGetNull(ds, dbName);
         // check that we can set & that when set we can get
         // doesn't actually open connections so a little silly.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
Thu Feb 21 09:52:49 2008
@@ -639,7 +639,6 @@
     {
         String dbName = "classpath:dbro";
         DataSource ds = JDBCDataSource.getDataSource(dbName);
-        JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
         
         try {
             ds.getConnection();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
Thu Feb 21 09:52:49 2008
@@ -84,7 +84,6 @@
             break;
             
         case UpgradeChange.PH_HARD_UPGRADE:
-            JDBCDataSource.setBeanProperty(ds, "createDatabase", "false");
             JDBCDataSource.setBeanProperty(ds, "connectionAttributes",
                     "upgrade=true");
             break;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?rev=629894&r1=629893&r2=629894&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java Thu
Feb 21 09:52:49 2008
@@ -37,9 +37,8 @@
     
     /**
      * Return a new DataSource corresponding to the current
-     * configuration.
-     * <p>The getConnection() method will return a connection identical to
-     * {@link TestConfiguration#openDefaultConnection}.
+     * configuration. The getConnection() method will return
+     * a connection identical to TestConfiguration.openDefaultConnection().
      */
     public static javax.sql.DataSource getDataSource()
     {
@@ -85,10 +84,6 @@
      * Create a new DataSource object setup from the passed in TestConfiguration.
      * The getConnection() method will return a connection identical to
      * TestConfiguration.openDefaultConnection().
-     * <p>
-     * If no properties are passed in, defaults are obtained from the
-     * current <code>TestConfiguration</code> and the data source will be
-     * configured to create the specified database if it does not exist.
      */
     static javax.sql.DataSource getDataSource(TestConfiguration config,
             HashMap beanProperties)
@@ -101,10 +96,6 @@
      * Create a new DataSource object setup from the passed in
      * TestConfiguration using the received properties and data
      * source class name.
-     * <p>
-     * If no properties are passed in, defaults are obtained from the
-     * current <code>TestConfiguration</code> and the data source will be
-     * configured to create the specified database if it does not exist.
      */
     static Object getDataSource(TestConfiguration config,
         HashMap beanProperties, String dsClassName)
@@ -132,8 +123,6 @@
         beanProperties.put("databaseName", config.getDefaultDatabaseName());
         beanProperties.put("user", config.getUserName());
         beanProperties.put("password", config.getUserPassword());
-        // By default non-existing databases will be created.
-        beanProperties.put("createDatabase", "create");
 
         
         return beanProperties;



Mime
View raw message