Search in sources :

Example 1 with OracleMuxRecordHandler

use of com.amazonaws.athena.connectors.oracle.OracleMuxRecordHandler in project aws-athena-query-federation by awslabs.

the class OracleMuxJdbcRecordHandlerTest method setup.

@Before
public void setup() {
    this.oracleRecordHandler = Mockito.mock(OracleRecordHandler.class);
    this.recordHandlerMap = Collections.singletonMap("oracle", this.oracleRecordHandler);
    this.amazonS3 = Mockito.mock(AmazonS3.class);
    this.secretsManager = Mockito.mock(AWSSecretsManager.class);
    this.athena = Mockito.mock(AmazonAthena.class);
    this.queryStatusChecker = Mockito.mock(QueryStatusChecker.class);
    this.jdbcConnectionFactory = Mockito.mock(JdbcConnectionFactory.class);
    DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog", "oracle", "oracle://jdbc:oracle:thin:${testSecret}@//127.0.0.1:1521/orcl", "testSecret");
    this.jdbcRecordHandler = new OracleMuxRecordHandler(this.amazonS3, this.secretsManager, this.athena, this.jdbcConnectionFactory, databaseConnectionConfig, this.recordHandlerMap);
}
Also used : JdbcConnectionFactory(com.amazonaws.athena.connectors.jdbc.connection.JdbcConnectionFactory) AmazonS3(com.amazonaws.services.s3.AmazonS3) QueryStatusChecker(com.amazonaws.athena.connector.lambda.QueryStatusChecker) OracleRecordHandler(com.amazonaws.athena.connectors.oracle.OracleRecordHandler) AWSSecretsManager(com.amazonaws.services.secretsmanager.AWSSecretsManager) OracleMuxRecordHandler(com.amazonaws.athena.connectors.oracle.OracleMuxRecordHandler) DatabaseConnectionConfig(com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig) AmazonAthena(com.amazonaws.services.athena.AmazonAthena) Before(org.junit.Before)

Aggregations

QueryStatusChecker (com.amazonaws.athena.connector.lambda.QueryStatusChecker)1 DatabaseConnectionConfig (com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig)1 JdbcConnectionFactory (com.amazonaws.athena.connectors.jdbc.connection.JdbcConnectionFactory)1 OracleMuxRecordHandler (com.amazonaws.athena.connectors.oracle.OracleMuxRecordHandler)1 OracleRecordHandler (com.amazonaws.athena.connectors.oracle.OracleRecordHandler)1 AmazonAthena (com.amazonaws.services.athena.AmazonAthena)1 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 AWSSecretsManager (com.amazonaws.services.secretsmanager.AWSSecretsManager)1 Before (org.junit.Before)1