use of io.confluent.ksql.metastore.KsqlStream in project ksql by confluentinc.
the class KsqlResourceTest method testListStreamsStatement.
@Test
public void testListStreamsStatement() throws Exception {
KsqlResource testResource = TestKsqlResourceUtil.get(ksqlEngine, ksqlRestConfig);
final String ksqlString = "LIST STREAMS;";
final ListStreams ksqlStatement = new ListStreams(Optional.empty());
StreamsList streamsList = makeSingleRequest(testResource, ksqlString, ksqlStatement, Collections.emptyMap(), StreamsList.class);
List<SourceInfo.Stream> testStreams = streamsList.getStreams();
assertEquals(1, testStreams.size());
SourceInfo expectedStream = new SourceInfo.Stream((KsqlStream) testResource.getKsqlEngine().getMetaStore().getSource("TEST_STREAM"));
assertEquals(expectedStream, testStreams.get(0));
}
Aggregations