use of io.confluent.ksql.engine.QueryEventListener in project ksql by confluentinc.
the class KsqlTesterTest method setUp.
@Before
public void setUp() {
final MockSchemaRegistryClient srClient = new MockSchemaRegistryClient();
this.topicClient = new FakeKafkaTopicClient();
this.serviceContext = TestServiceContext.create(topicClient, () -> srClient);
this.config = new KsqlConfig(BASE_CONFIG);
this.formatInjector = new DefaultFormatInjector();
final MetaStoreImpl metaStore = new MetaStoreImpl(TestFunctionRegistry.INSTANCE.get());
final MetricCollectors metricCollectors = new MetricCollectors();
this.engine = new KsqlEngine(serviceContext, NoopProcessingLogContext.INSTANCE, metaStore, ServiceInfo.create(config), new SequentialQueryIdGenerator(), this.config, Collections.singletonList(new QueryEventListener() {
@Override
public void onDeregister(QueryMetadata query) {
final DriverAndProperties driverAndProperties = drivers.get(query.getQueryId());
closeDriver(driverAndProperties.driver, driverAndProperties.properties, false);
}
}), metricCollectors);
this.expectedException = null;
this.expectedMessage = null;
this.overrides = new HashMap<>();
this.driverPipeline = new TestDriverPipeline();
}
Aggregations