use of io.confluent.ksql.util.KsqlConfig in project ksql by confluentinc.
the class KsqlBareOutputNodeTest method build.
private SchemaKStream build() {
final String simpleSelectFilter = "SELECT col0, col2, col3 FROM test1 WHERE col0 > 100;";
final KsqlBareOutputNode planNode = (KsqlBareOutputNode) planBuilder.buildLogicalPlan(simpleSelectFilter);
return planNode.buildStream(builder, new KsqlConfig(Collections.emptyMap()), new FakeKafkaTopicClient(), new FunctionRegistry(), new HashMap<>(), new MockSchemaRegistryClient());
}
use of io.confluent.ksql.util.KsqlConfig in project ksql by confluentinc.
the class KsqlSchemaRegistryClientFactoryTest method shouldPickUpPrefixedSslConfig.
@Test
public void shouldPickUpPrefixedSslConfig() {
// Given:
final KsqlConfig config = config("ksql.schema.registry." + SslConfigs.SSL_PROTOCOL_CONFIG, "SSLv3");
final Map<String, Object> expectedConfigs = defaultConfigs();
expectedConfigs.put(SslConfigs.SSL_PROTOCOL_CONFIG, "SSLv3");
setUpMocksWithExpectedConfig(expectedConfigs);
// When:
final SchemaRegistryClient client = new KsqlSchemaRegistryClientFactory(config, restServiceSupplier, sslFactory).create();
// Then:
assertThat(client, is(notNullValue()));
EasyMock.verify(restService);
}
use of io.confluent.ksql.util.KsqlConfig in project ksql by confluentinc.
the class KsqlSchemaRegistryClientFactoryTest method shouldSetSocketFactoryWhenNoSpecificSslConfig.
@Test
public void shouldSetSocketFactoryWhenNoSpecificSslConfig() {
// Given:
final KsqlConfig config = config();
final Map<String, Object> expectedConfigs = defaultConfigs();
setUpMocksWithExpectedConfig(expectedConfigs);
// When:
final SchemaRegistryClient client = new KsqlSchemaRegistryClientFactory(config, restServiceSupplier, sslFactory).create();
// Then:
assertThat(client, is(notNullValue()));
EasyMock.verify(restService);
}
use of io.confluent.ksql.util.KsqlConfig in project ksql by confluentinc.
the class KsqlSchemaRegistryClientFactoryTest method shouldPickUpNonPrefixedSslConfig.
@Test
public void shouldPickUpNonPrefixedSslConfig() {
// Given:
final KsqlConfig config = config(SslConfigs.SSL_PROTOCOL_CONFIG, "SSLv3");
final Map<String, Object> expectedConfigs = defaultConfigs();
expectedConfigs.put(SslConfigs.SSL_PROTOCOL_CONFIG, "SSLv3");
setUpMocksWithExpectedConfig(expectedConfigs);
// When:
final SchemaRegistryClient client = new KsqlSchemaRegistryClientFactory(config, restServiceSupplier, sslFactory).create();
// Then:
assertThat(client, is(notNullValue()));
EasyMock.verify(restService);
}
use of io.confluent.ksql.util.KsqlConfig in project ksql by confluentinc.
the class SchemaKStreamTest method init.
@Before
public void init() {
functionRegistry = new FunctionRegistry();
ksqlStream = (KsqlStream) metaStore.getSource("TEST1");
StreamsBuilder builder = new StreamsBuilder();
kStream = builder.stream(ksqlStream.getKsqlTopic().getKafkaTopicName(), Consumed.with(Serdes.String(), ksqlStream.getKsqlTopic().getKsqlTopicSerDe().getGenericRowSerde(null, new KsqlConfig(Collections.emptyMap()), false, new MockSchemaRegistryClient())));
}
Aggregations