use of org.apache.ignite.stream.kafka.TestKafkaBroker in project ignite by apache.
the class IgniteSourceConnectorTest method beforeTest.
/** {@inheritDoc} */
@Override
protected void beforeTest() throws Exception {
kafkaBroker = new TestKafkaBroker();
WorkerConfig workerCfg = new StandaloneConfig(makeWorkerProps());
MemoryOffsetBackingStore offBackingStore = new MemoryOffsetBackingStore();
offBackingStore.configure(workerCfg);
worker = new Worker(WORKER_ID, new SystemTime(), workerCfg, offBackingStore);
worker.start();
herder = new StandaloneHerder(worker);
herder.start();
}
use of org.apache.ignite.stream.kafka.TestKafkaBroker in project ignite by apache.
the class IgniteSinkConnectorTest method beforeTest.
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
protected void beforeTest() throws Exception {
kafkaBroker = new TestKafkaBroker();
for (String topic : TOPICS) kafkaBroker.createTopic(topic, PARTITIONS, REPLICATION_FACTOR);
WorkerConfig workerCfg = new StandaloneConfig(makeWorkerProps());
OffsetBackingStore offBackingStore = mock(OffsetBackingStore.class);
offBackingStore.configure(workerCfg);
worker = new Worker(WORKER_ID, new SystemTime(), workerCfg, offBackingStore);
worker.start();
herder = new StandaloneHerder(worker);
herder.start();
}
Aggregations