receiver.setSlotSharingGroup(sharingGroup);;
receiver.connectNewDataSetAsInput(sender1, DistributionPattern.POINTWISE);
receiver.connectNewDataSetAsInput(sender2, DistributionPattern.BIPARTITE);
final JobGraph jobGraph = new JobGraph("Bipartite Job", sender1, receiver, sender2);
JobManager jm = startJobManager(NUM_TASKS);
final GlobalBufferPool bp = ((LocalInstanceManager) jm.getInstanceManager())
.getTaskManagers()[0].getChannelManager().getGlobalBufferPool();
try {
JobSubmissionResult result = jm.submitJob(jobGraph);
if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
System.out.println(result.getDescription());
}
assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
// monitor the execution
ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
if (eg != null) {
eg.waitForJobEnd();
assertEquals(JobStatus.FINISHED, eg.getState());
}