use of co.cask.cdap.test.StreamManager in project cdap by caskdata.
the class FlowStreamIntegrationTestRun method testStreamFromOtherNamespaceBatch.
@Test
public void testStreamFromOtherNamespaceBatch() throws Exception {
NamespaceId streamSpace = new NamespaceId("streamSpace");
getNamespaceAdmin().create(new NamespaceMeta.Builder().setName(streamSpace).build());
// Deploy an app to add a stream in streamSpace
deployApplication(streamSpace, TestFlowStreamIntegrationAcrossNSApp.class);
ApplicationManager applicationManager = deployApplication(TestFlowStreamIntegrationAcrossNSApp.class);
StreamManager s1 = getStreamManager(streamSpace.stream("s1"));
StreamManager s1Default = getStreamManager("s1");
// Send to both stream
for (int i = 0; i < 50; i++) {
s1.send(String.valueOf(i));
s1Default.send(String.valueOf(i));
}
FlowManager flowManager = applicationManager.getFlowManager("StreamAcrossNSTestFlow");
submitAndVerifyFlowProgram(flowManager);
}
Aggregations