/* * (non-Javadoc) * * @see junit.framework.TestCase#setUp() */ @Before public void setUp() throws Exception { ds = DatabaseConnectionBuilder.buildDataSource( "sa", "", "org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:" + tmpDirPath + "/testCat;shutdown=true"); SqlScript coreSchemaScript = new SqlScript("src/test/resources/workflow.sql", ds); coreSchemaScript.loadScript(); coreSchemaScript.execute(); ds.getConnection().commit(); }
/** Default Constructor . */ public DataSourceCatalogFactory() { // instantiate data source String jdbcUrl, user, pass, driver; jdbcUrl = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url")); user = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user")); pass = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass")); driver = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver")); dataSource = DatabaseConnectionBuilder.buildDataSource(user, pass, driver, jdbcUrl); this.configure(); }