use of io.trino.testing.TestingConnectorContext in project trino by trinodb.
the class TestDeltaLakePlugin method testGlueMetastore.
@Test
public void testGlueMetastore() {
Plugin plugin = new TestingDeltaLakePlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("hive.metastore", "glue", "hive.metastore.glue.region", "us-east-2"), new TestingConnectorContext());
assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("hive.metastore", "glue", "hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext())).isInstanceOf(ApplicationConfigurationException.class).hasMessageContaining("Error: Configuration property 'hive.metastore.uri' was not used");
}
use of io.trino.testing.TestingConnectorContext in project trino by trinodb.
the class TestDeltaLakeSplitManager method setupSplitManager.
private DeltaLakeSplitManager setupSplitManager(List<AddFileEntry> addFileEntries, DeltaLakeConfig deltaLakeConfig) {
TestingConnectorContext context = new TestingConnectorContext();
TypeManager typeManager = context.getTypeManager();
MockDeltaLakeMetastore metastore = new MockDeltaLakeMetastore();
metastore.setValidDataFiles(addFileEntries);
return new DeltaLakeSplitManager(typeManager, (session, transaction) -> metastore, MoreExecutors.newDirectExecutorService(), deltaLakeConfig);
}
use of io.trino.testing.TestingConnectorContext in project trino by trinodb.
the class TestClickHousePlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new ClickHousePlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "jdbc:clickhouse://test"), new TestingConnectorContext());
}
use of io.trino.testing.TestingConnectorContext in project trino by trinodb.
the class TestDruidJdbcPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new DruidJdbcPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "jdbc:druid:test"), new TestingConnectorContext()).shutdown();
}
use of io.trino.testing.TestingConnectorContext in project trino by trinodb.
the class TestKuduPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new KuduPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("kudu.client.master-addresses", "localhost:7051"), new TestingConnectorContext()).shutdown();
}
Aggregations