use of io.confluent.ksql.test.tools.stubs.StubKafkaClientSupplier in project ksql by confluentinc.
the class TestExecutor method create.
/**
* Create instance.
*
* <p>If {@code validateResults} is {@code true} the test will fail if the results are as
* expected. This is the norm. If {@code false} the test will not fail if the results differ. This
* is useful when re-writing the historical plans.
*
* @param validateResults flag to indicate if results should be validated.
* @param extensionDir Optional extension directory.
* @return the executor.
*/
public static TestExecutor create(final boolean validateResults, final Optional<String> extensionDir) {
final StubKafkaService kafkaService = StubKafkaService.create();
final StubKafkaClientSupplier kafkaClientSupplier = new StubKafkaClientSupplier();
final ServiceContext serviceContext = getServiceContext(kafkaClientSupplier);
return new TestExecutor(kafkaService, serviceContext, getKsqlEngine(serviceContext, extensionDir), TestExecutorUtil::buildStreamsTopologyTestDrivers, validateResults);
}
Aggregations