Search in sources :

Example 1 with OracleContainer

use of org.testcontainers.containers.OracleContainer in project spring-data-jdbc by spring-projects.

the class OracleDataSourceConfiguration method createDataSource.

/*
	 * (non-Javadoc)
	 * @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
	 */
@Override
protected DataSource createDataSource() {
    if (ORACLE_CONTAINER == null) {
        LOG.info("Oracle starting...");
        OracleContainer container = new OracleContainer("gvenzl/oracle-xe:18.4.0-slim").withReuse(true);
        container.start();
        LOG.info("Oracle started");
        ORACLE_CONTAINER = container;
    }
    initDb();
    return new DriverManagerDataSource(ORACLE_CONTAINER.getJdbcUrl(), ORACLE_CONTAINER.getUsername(), ORACLE_CONTAINER.getPassword());
}
Also used : DriverManagerDataSource(org.springframework.jdbc.datasource.DriverManagerDataSource) OracleContainer(org.testcontainers.containers.OracleContainer)

Example 2 with OracleContainer

use of org.testcontainers.containers.OracleContainer in project presto by prestodb.

the class TestOracleTypes method test.

@Test
public void test() {
    OracleContainer oracle = new OracleContainer("wnameless/oracle-xe-11g-r2");
    oracle.start();
}
Also used : OracleContainer(org.testcontainers.containers.OracleContainer) DataTypeTest(com.facebook.presto.tests.datatype.DataTypeTest) Test(org.testng.annotations.Test)

Aggregations

OracleContainer (org.testcontainers.containers.OracleContainer)2 DataTypeTest (com.facebook.presto.tests.datatype.DataTypeTest)1 DriverManagerDataSource (org.springframework.jdbc.datasource.DriverManagerDataSource)1 Test (org.testng.annotations.Test)1