use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class PublishSubscribeTopicNames method testEmptyTopicName.
@Test(expected = IllegalArgumentException.class)
public void testEmptyTopicName() throws Exception {
final Topology t = new Topology();
t.strings().publish("", true);
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class PublishSubscribeTopicNames method testWildcardHash1TopicName.
@Test(expected = IllegalArgumentException.class)
public void testWildcardHash1TopicName() throws Exception {
final Topology t = new Topology();
t.strings().publish("engine/#", true);
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class PublishSubscribeWildcard method wildcardSingle.
/**
* Tests subscribing to a single stream with a wildcard filter.
* @param topicName
* @param topicFilter
* @throws Exception
*/
private void wildcardSingle(String topicName, String topicFilter, String... nonMatchTopics) throws Exception {
Topology t = new Topology();
List<String> data = publish(t, topicName, "P", nonMatchTopics.length);
for (String nonMatchTopic : nonMatchTopics) {
publishPoll(t, nonMatchTopic);
}
TStream<String> subscribe = t.subscribe(topicFilter, String.class);
completeAndValidate(subscribe, 30, data.toArray(new String[0]));
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class FileStreamsTest method testDirectoryWatcherOrder.
/**
* Test that directory watcher creates the correct output.
*/
@Test
public void testDirectoryWatcherOrder() throws Exception {
assumeTrue(this.getTesterType() == Type.STANDALONE_TESTER);
final Topology t = newTopology("testDirectoryWatcherOrder");
runDirectoryWatcher(t, 20, 1);
}
use of com.ibm.streamsx.topology.Topology in project streamsx.topology by IBMStreams.
the class FileStreamsTest method testDirectoryWatcherOrderWithDelete.
@Test
public void testDirectoryWatcherOrderWithDelete() throws Exception {
assumeTrue(this.getTesterType() == Type.STANDALONE_TESTER);
final Topology t = newTopology("testDirectoryWatcherOrderWithDelete");
runDirectoryWatcher(t, 20, 3);
}
Aggregations