use of io.confluent.ksql.rest.server.KsqlRestConfig 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);
}
use of io.confluent.ksql.rest.server.KsqlRestConfig in project ksql by confluentinc.
the class KsqlResourceTest method setUp.
@Before
public void setUp() throws IOException, RestClientException {
SchemaRegistryClient schemaRegistryClient = new MockSchemaRegistryClient();
registerSchema(schemaRegistryClient);
ksqlRestConfig = new KsqlRestConfig(TestKsqlResourceUtil.getDefaultKsqlConfig());
KsqlConfig ksqlConfig = new KsqlConfig(ksqlRestConfig.getKsqlConfigProperties());
ksqlEngine = new KsqlEngine(ksqlConfig, new MockKafkaTopicClient(), schemaRegistryClient, new MetaStoreImpl());
}
use of io.confluent.ksql.rest.server.KsqlRestConfig in project ksql by confluentinc.
the class KsqlRestClientTest method init.
@Before
public void init() throws Exception {
final int port = TestUtils.randomFreeLocalPort();
Map<String, Object> props = new HashMap<>();
props.put(KsqlRestConfig.LISTENERS_CONFIG, "http://localhost:" + port);
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "ksql_config_test");
ksqlRestConfig = new KsqlRestConfig(props);
mockApplication = new MockApplication(ksqlRestConfig);
mockApplication.start();
ksqlRestClient = new KsqlRestClient("http://localhost:" + port);
}
Aggregations