use of io.confluent.ksql.rest.server.services.TestRestServiceContextFactory.InternalSimpleKsqlClientFactory in project ksql by confluentinc.
the class TestKsqlRestApp method initialize.
protected void initialize() {
if (ksqlRestApplication != null) {
after();
}
ksqlRestConfig = buildConfig(bootstrapServers, baseConfig);
try {
Vertx vertx = Vertx.vertx();
ksqlRestApplication = KsqlRestApplication.buildApplication(metricsPrefix, ksqlRestConfig, (booleanSupplier) -> mock(VersionCheckerAgent.class), 3, serviceContext.get(), () -> serviceContext.get().getSchemaRegistryClient(), (authHeader, requestHeaders, userPrincipal) -> serviceContext.get().getConnectClient(), vertx, InternalKsqlClientFactory.createInternalClient(PropertiesUtil.toMapStrings(ksqlRestConfig.originals()), SocketAddress::inetSocketAddress, vertx), TestRestServiceContextFactory.createDefault(internalSimpleKsqlClientFactory), TestRestServiceContextFactory.createUser(internalSimpleKsqlClientFactory), new MetricCollectors());
} catch (final Exception e) {
throw new RuntimeException("Failed to initialise", e);
}
}
Aggregations