Thread.sleep(200);
}
// kill one task manager
TaskManager tm = ((LocalInstanceManager) jm.getInstanceManager()).getTaskManagers()[0];
tm.shutdown();
eg.waitForJobEnd();
// make sure that in any case, the network buffers are all returned
waitForTaskThreadsToBeTerminated();