use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class KafkaStreamsTest method testSubscribeNullTopic.
@Test(expected = IllegalArgumentException.class)
public void testSubscribeNullTopic() throws Exception {
Topology top = new Topology("testSubscribeNullTopic");
KafkaConsumer consumer = new KafkaConsumer(top, createConsumerConfig("group"));
// throws IAE
consumer.subscribe(null);
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class KafkaStreamsTest method testSubscribeNegThreadsPerTopic.
@Test(expected = IllegalArgumentException.class)
public void testSubscribeNegThreadsPerTopic() throws Exception {
Topology top = new Topology("testSubscribeNegThreadsPerTopic");
KafkaConsumer consumer = new KafkaConsumer(top, createConsumerConfig("group"));
// throws IAE
consumer.subscribe(new Value<Integer>(-1), new Value<String>("topic"));
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class KafkaStreamsTest method testConfigParams.
@Test
public void testConfigParams() throws Exception {
Topology top = new Topology("testConfigParams");
String groupId = newGroupId(top.getName());
Map<String, Object> producerConfig = createProducerConfig();
Map<String, Object> consumerConfig = createConsumerConfig(groupId);
KafkaProducer producer = new KafkaProducer(top, producerConfig);
Map<String, Object> pcfg = producer.getConfig();
for (Object o : producerConfig.keySet()) assertEquals("property " + o, producerConfig.get(o), pcfg.get(o));
KafkaConsumer consumer = new KafkaConsumer(top, consumerConfig);
Map<String, Object> ccfg = consumer.getConfig();
for (Object o : consumerConfig.keySet()) assertEquals("property " + o, consumerConfig.get(o), ccfg.get(o));
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class FileStreamsTest method testDirectoryWatcherOrderWithDelete.
@Test
public void testDirectoryWatcherOrderWithDelete() throws Exception {
final Topology t = new Topology("testDirectoryWatcherOrder");
runDirectoryWatcher(t, 20, 3);
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class JCPTest method testJCP.
@Test
public void testJCP() throws Exception {
Topology topology = newTopology("testSingleJCP");
topology.addJobControlPlane();
submitAndCheckJCPIsThere(topology);
}
Aggregations