Search in sources :

Example 1 with KsqlRestApplication

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);
}
Also used : KsqlRestClient(io.confluent.ksql.rest.client.KsqlRestClient) KsqlRestApplication(io.confluent.ksql.rest.server.KsqlRestApplication) Cli(io.confluent.ksql.cli.Cli) KsqlRestConfig(io.confluent.ksql.rest.server.KsqlRestConfig) VersionCheckerAgent(io.confluent.ksql.version.metrics.VersionCheckerAgent) BeforeClass(org.junit.BeforeClass)

Aggregations

Cli (io.confluent.ksql.cli.Cli)1 KsqlRestClient (io.confluent.ksql.rest.client.KsqlRestClient)1 KsqlRestApplication (io.confluent.ksql.rest.server.KsqlRestApplication)1 KsqlRestConfig (io.confluent.ksql.rest.server.KsqlRestConfig)1 VersionCheckerAgent (io.confluent.ksql.version.metrics.VersionCheckerAgent)1 BeforeClass (org.junit.BeforeClass)1