use of io.confluent.ksql.util.ItemDataProvider in project ksql by confluentinc.
the class JoinIntTest method before.
@Before
public void before() throws Exception {
testHarness = new IntegrationTestHarness();
testHarness.start();
Map<String, Object> ksqlStreamConfigProps = new HashMap<>();
ksqlStreamConfigProps.putAll(testHarness.ksqlConfig.getKsqlStreamConfigProps());
// turn caching off to improve join consistency
ksqlStreamConfigProps.put(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG, 0);
ksqlStreamConfigProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");
ksqlContext = KsqlContext.create(new KsqlConfig(ksqlStreamConfigProps), testHarness.schemaRegistryClient);
/**
* Setup test data
*/
testHarness.createTopic(itemTableTopicJson);
testHarness.createTopic(itemTableTopicAvro);
itemDataProvider = new ItemDataProvider();
testHarness.publishTestData(itemTableTopicJson, itemDataProvider, now - 500);
testHarness.publishTestData(itemTableTopicAvro, itemDataProvider, now - 500, DataSource.DataSourceSerDe.AVRO);
testHarness.createTopic(orderStreamTopicJson);
testHarness.createTopic(orderStreamTopicAvro);
orderDataProvider = new OrderDataProvider();
testHarness.publishTestData(orderStreamTopicJson, orderDataProvider, now);
testHarness.publishTestData(orderStreamTopicAvro, orderDataProvider, now, DataSource.DataSourceSerDe.AVRO);
createStreams();
}
use of io.confluent.ksql.util.ItemDataProvider in project ksql by confluentinc.
the class UdfIntTest method before.
@Before
public void before() throws Exception {
testHarness = new IntegrationTestHarness();
testHarness.start();
ksqlContext = KsqlContext.create(testHarness.ksqlConfig, testHarness.schemaRegistryClient);
testHarness.createTopic(jsonTopicName);
testHarness.createTopic(avroTopicName);
/**
* Setup test data
*/
orderDataProvider = new OrderDataProvider();
itemDataProvider = new ItemDataProvider();
jsonRecordMetadataMap = testHarness.publishTestData(jsonTopicName, orderDataProvider, null, DataSource.DataSourceSerDe.JSON);
avroRecordMetadataMap = testHarness.publishTestData(avroTopicName, orderDataProvider, null, DataSource.DataSourceSerDe.AVRO);
testHarness.publishTestData(delimitedTopicName, itemDataProvider, null, DataSource.DataSourceSerDe.DELIMITED);
createOrdersStream();
}
Aggregations