Index: foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/junit/JUnitTestCaseHelper.java =================================================================== --- foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/junit/JUnitTestCaseHelper.java (revision 6496) +++ foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/junit/JUnitTestCaseHelper.java (working copy) @@ -89,19 +89,19 @@ } } if (dbDriver == null) { - dbDriver = (String) properties.get("db.driver"); + dbDriver = (String) properties.get(DB_DRIVER_KEY); } if (dbUrl == null) { - dbUrl = (String) properties.get("db.url"); + dbUrl = (String) properties.get(DB_URL_KEY); } if (dbUser == null) { - dbUser = (String) properties.get("db.user"); + dbUser = (String) properties.get(DB_USER_KEY); } if (dbPwd == null) { - dbPwd = (String) properties.get("db.pwd"); + dbPwd = (String) properties.get(DB_PWD_KEY); } if (platform == null) { - platform = (String) properties.get("db.platform"); + platform = (String) properties.get(DB_PLATFORM_KEY); } if (logLevel == null) { logLevel = (String) properties.get(PersistenceUnitProperties.LOGGING_LEVEL); Index: jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java =================================================================== --- jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java (revision 6496) +++ jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java (working copy) @@ -13,13 +13,11 @@ package org.eclipse.persistence.testing.framework.wdf; -import java.io.File; import java.lang.annotation.Annotation; import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; +import java.util.Map; +import org.eclipse.persistence.config.PersistenceUnitProperties; import org.eclipse.persistence.internal.databaseaccess.Platform; import org.eclipse.persistence.platform.database.DatabasePlatform; import org.eclipse.persistence.testing.framework.junit.JUnitTestCase; @@ -38,12 +36,13 @@ final boolean runAllUnknown; final Class databasePlatformClass; + @SuppressWarnings("unchecked") public SkipBugzillaTestRunner(Class klass) throws Throwable { super(klass); - Properties properties = loadProperties(); + Map properties = JUnitTestCaseHelper.getDatabaseProperties(); - String databasePlatformClassName = properties.getProperty(JUnitTestCaseHelper.DB_PLATFORM_KEY); + String databasePlatformClassName = properties.get(PersistenceUnitProperties.TARGET_DATABASE); databasePlatformClass = (Class) Class.forName(databasePlatformClassName); @@ -128,35 +127,6 @@ return; } - private static Properties loadProperties() { - Properties properties = new Properties(); - File testPropertiesFile = new File(System.getProperty(JUnitTestCaseHelper.TEST_PROPERTIES_FILE_KEY, - JUnitTestCaseHelper.TEST_PROPERTIES_FILE_DEFAULT)); - URL url = null; - if (testPropertiesFile.exists()) { - try { - url = testPropertiesFile.toURI().toURL(); - } catch (MalformedURLException exception) { - throw new RuntimeException("Error loading " + testPropertiesFile.getName() + ".", exception); - } - } else { - // Load as a resource if from a jar. - url = JUnitTestCaseHelper.class.getResource("/" - + System.getProperty(JUnitTestCaseHelper.TEST_PROPERTIES_FILE_KEY, - JUnitTestCaseHelper.TEST_PROPERTIES_FILE_DEFAULT)); - } - if (url != null) { - try { - properties.load(url.openStream()); - } catch (java.io.IOException exception) { - throw new RuntimeException("Error loading " + testPropertiesFile.getName() + ".", exception); - } - } - - return properties; - - } - private static class SkipException extends Exception { private static final long serialVersionUID = 1L; }