use of io.confluent.ksql.util.KsqlConstants.KsqlQueryType in project ksql by confluentinc.
the class TestKsqlRestApp method getQueries.
private Set<RunningQuery> getQueries(final KsqlRestClient client, final KsqlQueryType queryType) {
final RestResponse<KsqlEntityList> response = makeKsqlRequest(client, "SHOW QUERIES;");
if (response.isErroneous()) {
throw new AssertionError("Failed to get persistent queries." + " msg:" + response.getErrorMessage());
}
final Queries queries = (Queries) response.getResponse().get(0);
return queries.getQueries().stream().filter(query -> query.getQueryType() == queryType).collect(Collectors.toSet());
}
Aggregations