Merge branch 'master' of github.com:wso2/product-mdm

revert-dabc3590
Dulitha Wijewantha 10 years ago
commit ccd778160f

@ -124,5 +124,10 @@
<groupId>org.apache.tomcat.wso2</groupId> <groupId>org.apache.tomcat.wso2</groupId>
<artifactId>jdbc-pool</artifactId> <artifactId>jdbc-pool</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.h2database.wso2</groupId>
<artifactId>h2-database-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -22,12 +22,12 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import java.util.List; import java.util.List;
@XmlRootElement(name = "DeviceMgtTestDBConfigurations") @XmlRootElement(name = "TestDataSourceConfigurations")
public class TestDBConfigurations { public class TestDBConfigurations {
private List<TestDBConfiguration> dbTypesList; private List<TestDBConfiguration> dbTypesList;
@XmlElement(name = "DBType") @XmlElement(name = "Type")
public List<TestDBConfiguration> getDbTypesList() { public List<TestDBConfiguration> getDbTypesList() {
return dbTypesList; return dbTypesList;
} }

@ -112,12 +112,16 @@ public class MobileFeatureDAOTestSuite {
} }
private void createH2DB(TestDBConfiguration testDBConf) throws Exception { private void createH2DB(TestDBConfiguration testDBConf) throws Exception {
Class.forName(testDBConf.getDriverClassName()); try {
conn = DriverManager.getConnection(testDBConf.getConnectionURL()); Class.forName(testDBConf.getDriverClassName());
stmt = conn.createStatement(); conn = DriverManager.getConnection(testDBConf.getConnectionURL());
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'"); stmt = conn.createStatement();
stmt.close(); stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
conn.close(); } finally {
stmt.close();
conn.close();
TestUtils.cleanupResources(conn, stmt, null);
}
} }
@Test @Test

Loading…
Cancel
Save