Search in sources :

Example 1 with ListQueries

use of io.confluent.ksql.parser.tree.ListQueries in project ksql by confluentinc.

the class KsqlResourceTest method testShowQueries.

@Test
public void testShowQueries() throws Exception {
    KsqlResource testResource = TestKsqlResourceUtil.get(ksqlEngine, ksqlRestConfig);
    final String ksqlString = "SHOW QUERIES;";
    final ListQueries ksqlStatement = new ListQueries(Optional.empty());
    final String testKafkaTopic = "lol";
    final String testQueryStatement = String.format("CREATE STREAM %s AS SELECT * FROM test_stream WHERE S2_F2 > 69;", testKafkaTopic);
    Queries queries = makeSingleRequest(testResource, ksqlString, ksqlStatement, Collections.emptyMap(), Queries.class);
    List<Queries.RunningQuery> testQueries = queries.getQueries();
    assertEquals(0, testQueries.size());
}
Also used : Queries(io.confluent.ksql.rest.entity.Queries) ListQueries(io.confluent.ksql.parser.tree.ListQueries) ListQueries(io.confluent.ksql.parser.tree.ListQueries) Test(org.junit.Test)

Aggregations

ListQueries (io.confluent.ksql.parser.tree.ListQueries)1 Queries (io.confluent.ksql.rest.entity.Queries)1 Test (org.junit.Test)1