use of io.confluent.ksql.rest.server.KsqlRestApplication in project ksql by confluentinc.
the class CliTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
KsqlRestClient restClient = new KsqlRestClient(LOCAL_REST_SERVER_ADDR);
// TODO: Fix Properties Setup in Local().getCli()
// Local local = new Local().getCli();
// LocalCli localCli = local.getCli(restClient, terminal);
// TODO: add remote cli test cases
terminal = new TestTerminal(CLI_OUTPUT_FORMAT, restClient);
KsqlRestConfig restServerConfig = new KsqlRestConfig(defaultServerProperties());
commandTopicName = restServerConfig.getCommandTopic(KsqlConfig.KSQL_SERVICE_ID_DEFAULT);
orderDataProvider = new OrderDataProvider();
CLUSTER.createTopic(orderDataProvider.topicName());
KsqlRestApplication restServer = KsqlRestApplication.buildApplication(restServerConfig, false, EasyMock.mock(VersionCheckerAgent.class));
restServer.start();
localCli = new Cli(STREAMED_QUERY_ROW_LIMIT, STREAMED_QUERY_TIMEOUT_MS, restClient, terminal);
TestRunner.setup(localCli, terminal);
topicProducer = new TopicProducer(CLUSTER);
topicConsumer = new TopicConsumer(CLUSTER);
testListOrShowCommands();
produceInputStream(orderDataProvider);
}
Aggregations