@SuppressWarnings("unused") @Test(expected = IllegalStateException.class) public void testColocateLowLatencyRegions() throws Exception { assumeTrue(isMainRun()); // ensure colocating two low latency regions doesn't break lowLatancy // and colocating is achieved. Topology t = newTopology("testColocateLowLatencyRegions"); Tester tester = t.getTester(); // getConfig().put(ContextProperties.KEEP_ARTIFACTS, true); TStream<String> s1 = t.strings("a").lowLatency().modify(getContainerIdAppend()).modify(getContainerIdAppend()); s1.endLowLatency(); TStream<String> s2 = t.strings("A").lowLatency().modify(getContainerIdAppend()).modify(getContainerIdAppend()); s2.endLowLatency(); s1.colocate(s2); // expect throw ISE: colocate in a low latency region // once it's supported... (today it breaks the low latency guarantee) // and adjust isMainRun() too // // Given the default fuse-island behavior, expect islands to continue // // to be fused, now both in a single container. // // // Today FAILING in an interesting way. // // There are 2 PEs: // // - one has just the single colocated s1 and s2 modify ops // // - the other has everything else // // TStream<String> all = s1.union(s2); // all.print(); // Condition<Long> nTuples = tester.tupleCount(all.filter(new AllowAll<String>()), 2); // Condition<List<String>> contents = tester.stringContents( // all.filter(new AllowAll<String>()), ""); // // complete(tester, nTuples, 10, TimeUnit.SECONDS); // // Set<String> ids = getContainerIds(contents.getResult()); // assertEquals("ids: "+ids, 1, ids.size()); }