use of io.confluent.ksql.api.client.impl.ClientImpl in project ksql by confluentinc.
the class ConsistencyOffsetVectorFunctionalTest method shouldRoundTripCVWhenPullQueryOnTableSync.
@Test
public void shouldRoundTripCVWhenPullQueryOnTableSync() throws Exception {
// When
final StreamedQueryResult streamedQueryResult = consistencClient.streamQuery(PULL_QUERY_ON_TABLE).get();
streamedQueryResult.poll();
// Then
assertThatEventually(streamedQueryResult::isComplete, is(true));
assertThatEventually(() -> ((ClientImpl) consistencClient).getSerializedConsistencyVector(), is(notNullValue()));
final String serializedCV = ((ClientImpl) consistencClient).getSerializedConsistencyVector();
verifyConsistencyVector(serializedCV);
}
use of io.confluent.ksql.api.client.impl.ClientImpl in project ksql by confluentinc.
the class ConsistencyOffsetVectorFunctionalTest method shouldRoundTripCVWhenPullQueryOnTableAsync.
@Test
public void shouldRoundTripCVWhenPullQueryOnTableAsync() throws Exception {
// When
final StreamedQueryResult streamedQueryResult = consistencClient.streamQuery(PULL_QUERY_ON_TABLE).get();
// Then
shouldReceiveRows(streamedQueryResult, 1, // do nothing
(v) -> {
}, true);
assertThatEventually(streamedQueryResult::isComplete, is(true));
assertThat(((ClientImpl) consistencClient).getSerializedConsistencyVector(), is(notNullValue()));
final String serializedCV = ((ClientImpl) consistencClient).getSerializedConsistencyVector();
verifyConsistencyVector(serializedCV);
}
use of io.confluent.ksql.api.client.impl.ClientImpl in project ksql by confluentinc.
the class ConsistencyOffsetVectorFunctionalTest method shouldRoundTripCVWhenExecutePullQuery.
@Test
public void shouldRoundTripCVWhenExecutePullQuery() throws Exception {
// When
final BatchedQueryResult batchedQueryResult = consistencClient.executeQuery(PULL_QUERY_ON_TABLE);
final List<Row> rows = batchedQueryResult.get();
// Then
assertThat(rows, hasSize(1));
assertThat(batchedQueryResult.queryID().get(), is(notNullValue()));
assertThatEventually(() -> ((ClientImpl) consistencClient).getSerializedConsistencyVector(), is(notNullValue()));
final String serializedCV = ((ClientImpl) consistencClient).getSerializedConsistencyVector();
verifyConsistencyVector(serializedCV);
}
Aggregations