use of io.confluent.ksql.integration.TestKsqlContext in project ksql by confluentinc.
the class KsMaterializationFunctionalTest method shouldReturnEmptyIfAppServerNotConfigured.
@Test
public void shouldReturnEmptyIfAppServerNotConfigured() {
// Given:
try (TestKsqlContext ksqlNoAppServer = TEST_HARNESS.ksqlContextBuilder().build()) {
initializeKsql(ksqlNoAppServer);
final PersistentQueryMetadata query = executeQuery(ksqlNoAppServer, "CREATE TABLE " + output + " AS" + " SELECT USERID, COUNT(*) AS COUNT FROM " + USER_TABLE + " GROUP BY USERID;");
// When:
final Optional<Materialization> result = query.getMaterialization(queryId, contextStacker);
// Then:
assertThat(result, is(Optional.empty()));
}
}
Aggregations