Search in sources :

Example 11 with AllowAll

use of com.ibm.streamsx.topology.test.AllowAll in project streamsx.topology by IBMStreams.

the class PlaceableTest method testSimpleDistributedHostTags.

/**
     * Test with a distributed execution with explicit
     * colocation of two functions end up on the same container.
     */
@Test
// TODO
@Ignore("Need to figure out how to get the tags set by the test")
public void testSimpleDistributedHostTags() throws Exception {
    assumeTrue(SC_OK);
    assumeTrue(getTesterType() == StreamsContext.Type.DISTRIBUTED_TESTER);
    Topology t = newTopology();
    TStream<String> sa = t.strings("a");
    sa.addResourceTags("application");
    sa = sa.filter(new AllowAll<String>());
    sa.addResourceTags("application");
    getConfig().put(ContextProperties.KEEP_ARTIFACTS, Boolean.TRUE);
    Condition<List<String>> aout = t.getTester().stringContents(sa, "a");
    complete(t.getTester(), aout, 10, TimeUnit.SECONDS);
    assertTrue(aout.getResult().toString(), aout.valid());
}
Also used : AllowAll(com.ibm.streamsx.topology.test.AllowAll) List(java.util.List) Topology(com.ibm.streamsx.topology.Topology) TestTopology(com.ibm.streamsx.topology.test.TestTopology) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Topology (com.ibm.streamsx.topology.Topology)11 AllowAll (com.ibm.streamsx.topology.test.AllowAll)11 TestTopology (com.ibm.streamsx.topology.test.TestTopology)11 Test (org.junit.Test)11 List (java.util.List)8 Tester (com.ibm.streamsx.topology.tester.Tester)7 ArrayList (java.util.ArrayList)6 TStream (com.ibm.streamsx.topology.TStream)3 HashSet (java.util.HashSet)3 Ignore (org.junit.Ignore)3 OutputTuple (com.ibm.streams.operator.OutputTuple)1 Tuple (com.ibm.streams.operator.Tuple)1 StreamsContext (com.ibm.streamsx.topology.context.StreamsContext)1 SPLStream (com.ibm.streamsx.topology.spl.SPLStream)1 File (java.io.File)1 HashMap (java.util.HashMap)1