Search in sources :

Example 1 with OracleMuxMetadataHandler

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

the class OracleMuxJdbcMetadataHandlerTest method setup.

@Before
public void setup() {
    // this.allocator = Mockito.mock(BlockAllocator.class);
    this.allocator = new BlockAllocatorImpl();
    // Mockito.when(this.allocator.createBlock(Mockito.any(Schema.class))).thenReturn(Mockito.mock(Block.class));
    this.oracleMetadataHandler = Mockito.mock(OracleMetadataHandler.class);
    this.metadataHandlerMap = Collections.singletonMap("fakedatabase", this.oracleMetadataHandler);
    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", "fakedatabase", "fakedatabase://jdbc:fakedatabase://hostname/${testSecret}", "testSecret");
    this.jdbcMetadataHandler = new OracleMuxMetadataHandler(this.secretsManager, this.athena, this.jdbcConnectionFactory, this.metadataHandlerMap, databaseConnectionConfig);
}
Also used : JdbcConnectionFactory(com.amazonaws.athena.connectors.jdbc.connection.JdbcConnectionFactory) QueryStatusChecker(com.amazonaws.athena.connector.lambda.QueryStatusChecker) BlockAllocatorImpl(com.amazonaws.athena.connector.lambda.data.BlockAllocatorImpl) AWSSecretsManager(com.amazonaws.services.secretsmanager.AWSSecretsManager) OracleMetadataHandler(com.amazonaws.athena.connectors.oracle.OracleMetadataHandler) DatabaseConnectionConfig(com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig) AmazonAthena(com.amazonaws.services.athena.AmazonAthena) OracleMuxMetadataHandler(com.amazonaws.athena.connectors.oracle.OracleMuxMetadataHandler) Before(org.junit.Before)

Aggregations

QueryStatusChecker (com.amazonaws.athena.connector.lambda.QueryStatusChecker)1 BlockAllocatorImpl (com.amazonaws.athena.connector.lambda.data.BlockAllocatorImpl)1 DatabaseConnectionConfig (com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig)1 JdbcConnectionFactory (com.amazonaws.athena.connectors.jdbc.connection.JdbcConnectionFactory)1 OracleMetadataHandler (com.amazonaws.athena.connectors.oracle.OracleMetadataHandler)1 OracleMuxMetadataHandler (com.amazonaws.athena.connectors.oracle.OracleMuxMetadataHandler)1 AmazonAthena (com.amazonaws.services.athena.AmazonAthena)1 AWSSecretsManager (com.amazonaws.services.secretsmanager.AWSSecretsManager)1 Before (org.junit.Before)1