// task controller setup should fail validating permissions.
Throwable th = null;
try {
controller.setup(
new LocalDirAllocator(JobConf.MAPRED_LOCAL_DIR_PROPERTY),
new LocalStorage(controller.getConf().getStrings(
JobConf.MAPRED_LOCAL_DIR_PROPERTY)));
} catch (IOException ie) {
th = ie;
}
assertNotNull("No exception during setup", th);
assertTrue("Exception message does not contain exit code"
+ INVALID_TASKCONTROLLER_PERMISSIONS, th.getMessage().contains(
"with exit code " + INVALID_TASKCONTROLLER_PERMISSIONS));
} else {
controller.setup(new LocalDirAllocator(JobConf.MAPRED_LOCAL_DIR_PROPERTY),
new LocalStorage(controller.getConf().getStrings(
JobConf.MAPRED_LOCAL_DIR_PROPERTY)));
}
}