use of io.trino.spi.connector.ConnectorFactory in project trino by trinodb.
the class TestThriftPlugin method testPlugin.
@Test
public void testPlugin() {
Plugin plugin = new ThriftPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
assertInstanceOf(factory, ThriftConnectorFactory.class);
Map<String, String> config = ImmutableMap.of("trino.thrift.client.addresses", "localhost:7779");
Connector connector = factory.create("test", config, new TestingConnectorContext());
assertNotNull(connector);
assertInstanceOf(connector, ThriftConnector.class);
connector.shutdown();
}
Aggregations