org.testcontainers.containers.OracleContainer Java Examples

The following examples show how to use org.testcontainers.containers.OracleContainer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimpleOracleTest.java    From testcontainers-java with MIT License 5 votes vote down vote up
@Test
public void testSimple() throws SQLException {
    try (OracleContainer oracle = new OracleContainer()) {
        ResultSet resultSet = performQuery(oracle, "SELECT 1 FROM dual");

        int resultSetInt = resultSet.getInt(1);

        assertEquals("A basic SELECT query succeeds", 1, resultSetInt);
    }
}
 
Example #2
Source File: OracleServerConfig.java    From ShedLock with Apache License 2.0 4 votes vote down vote up
public void startDb() {
    oracle = new OracleContainer("oracleinanutshell/oracle-xe-11g")
        .withLogConsumer(outputFrame -> logger.debug(outputFrame.getUtf8String()));
    oracle.start();
}