Log Message: |
DERBY-398 - Bring store tests into J2ME/CDC Foundation testing
Contributed by Deepa Remesh
Attaching a patch 'store_patch.diff' for enabling tests (mostly store tests) to run in J2ME. This patch does the following:
* i18n\urlLocale.sql, i18n\urlLocale_app.properties, urlLocale.out - Removed protocol name from URLs and added 'ij.protocol' to app_properties file so that test can run in J2ME. Updated master file.
* i18n\DefaultLocale.java - Removed lines to get nested connection from procedure methods since these connections were not used. This was causing failures with JSR169 where nested connections are not supported.
* i18n\iepnegativetests_ES_app.properties, iepnegativetests_ES.out - Added 'ij.protocol' to app_properties file so that test can run in J2ME. Updated master file.
* storetests\st_1_app.properties, storetests\st_schema_app.properties, storetests\st_b5772_app.properties, storetests\derby94_app.properties - Changed the property 'database' to 'ij.database' in st_schema_app.properties.
* tools\ij2_app.properties - Changed the property 'database' to 'ij.database' and added ij.dataSource properties.
* tools\ij4_app.properties - Added comment that this test has to be excluded since it is a test for a case with no default driver.
* tools\iepnegativetests_app.properties, tools\iepnegativetests.sql, iepnegativetests.out - Removed protocol name from URLs and added 'ij.protocol' to app_properties file so that test can run in J2ME. Updated master file.
* tools\ij_app.properties - Added comment that test is specific to ij and tests bad/good urls
* testRoutines.sql - To avoid using nested connection, directly called create procedures instead of calling a wrapper which will create the procedures.
* store\databaseProperties_app.properties, databaseProperties.out - Changed the master file to match change in testRoutines.sql
* TestUtil.java - Changed getDataSource method to handle case for EmbeddedSimpleDataSource. Added getDataSourceConnection method which takes a Properties object and returns a connection using the appropriate data source class. This method can be used to boot/shutdown Derby using DataSource.
* lang\errorStream_app.properties - This test works with changes to TestUtil.getDataSource method to handle case for EmbeddedSimpleDataSource.
* lang\logStream.java, lang\logStream_app.properties, logStream.out - Changed to call TestUtil.getDataSourceConnection instead of DriverManager.getConnection
* lang\functions_app.properties - Added comment that test is excluded for now since it uses server-side JDBC. This test can be converted to Java test to call only functions which do not use server-side JDBC in JSR169 environment.
* lang\releaseCompileLocks_app.properties - Added comment that test uses server-side JDBC
* store\backupRestore.sql, store\backupRestore_app.properties, backupRestore.out - Removed protocol name from URLs. Updated master file.
* store\removeStubs.sql, store\removeStubs_app.properties, removeStubs.out - Removed protocol name from URLs. Updated master file.
* store\rollForwardBackup_app.properties, store\rollForwardBackup.sql, rollForwardBackup.out - Removed protocol name from URLs. Updated master file.
* store\connectDisconnect_app.properties - This test works after changes for DERBY-597. So just re-enabled it.
* store\Beetle6038_app.properties - Added comment that this tests encryption which is not supported in Derby J2ME implementation
* store\TestDurabilityProperty.java, store\TestDurabilityProperty_app.properties - Changed to call TestUtil.getDataSourceConnection instead of DriverManager.getConnection
* store\backupRestore1.java, store\backupRestore1_app.properties - Changed to call TestUtil.getDataSourceConnection instead of DriverManager.getConnection
* store\MaxLogNumber_app.properties, store\MaxLogNumberRecovery_app.properties - Changed the property 'database' to 'ij.database' and added ij.dataSource properties.
* store\rollForwardRecovery.sql, store\rollForwardRecovery_app.properties, rollForwardRecovery.out - Removed protocol name from URLs. Updated master file.
* store\logDevice_app.properties - This test works after changes for DERBY-597. So just re-enabled it.
* lang\closed.java, lang\closed_app.properties - Added catch for NoSuchMethodError for DatabaseMetadata.getURL method. Skips 'shutDownTest' if it is JSR169. I think I can change this to use TestUtil.getDataSourceConnection for shutdown test. I noticed this when writing this down and so will submit this in my next patch.
* j9_foundation\closed.out - Added new master to handle DatabaseMetadata.getURL
* j9_foundation\ij2.out - Added new master because of difference in output of show connections in J2ME.
Ran derbyall with this patch using Sun JDK 1.4.2 and j9_foundation in IBM WCTME 5.7. No new failures.
Created: 28/Jun/05 07:23 PM Updated: Yesterday 11:56 PM
|