use of io.prestosql.spi.connector.ConnectorFactory in project hetu-core by openlookeng.
the class TestPostgreSqlPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new PostgreSqlPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext());
}
use of io.prestosql.spi.connector.ConnectorFactory in project hetu-core by openlookeng.
the class TestMySqlPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new MySqlPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "jdbc:mysql://test"), new TestingConnectorContext());
}
use of io.prestosql.spi.connector.ConnectorFactory in project hetu-core by openlookeng.
the class TestThriftPlugin method testPlugin.
@Test
public void testPlugin() {
ThriftPlugin plugin = loadPlugin(ThriftPlugin.class);
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
assertInstanceOf(factory, ThriftConnectorFactory.class);
Map<String, String> config = ImmutableMap.of("presto.thrift.client.addresses", "localhost:7779");
Connector connector = factory.create("test", config, new TestingConnectorContext());
assertNotNull(connector);
assertInstanceOf(connector, ThriftConnector.class);
}
use of io.prestosql.spi.connector.ConnectorFactory in project hetu-core by openlookeng.
the class TestSqlServerPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new SqlServerPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext());
}
use of io.prestosql.spi.connector.ConnectorFactory in project hetu-core by openlookeng.
the class TestKafkaPlugin method testSpinup.
@Test
public void testSpinup() {
KafkaPlugin plugin = new KafkaPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
assertInstanceOf(factory, KafkaConnectorFactory.class);
Connector c = factory.create("test-connector", ImmutableMap.<String, String>builder().put("kafka.table-names", "test").put("kafka.nodes", "localhost:9092").build(), new TestingConnectorContext());
assertNotNull(c);
}
Aggregations