I think the test case testNumSlotsUsedForTaskCleanup is supposed to check that one task-cleanup task only need one slot even for high RAM jobs. This test case create a fake high RAM job with one map task and one reduce task. Each task require 2 slots. Then check that each heartbeat will schedule one task-cleanup task which need only one slot. So it need't to create dummy tracker status with FAILED_UNCLEAN tasks.
The result of the change in
MAPREDUCE-2207 is that task-cleanup tasks can't be scheduled to trackers with FAILED_UNCLEAN tasks to report during heartbeat, no matter the task failed on which tracker. This cause none task-cleanup task will be scheduled during heartbeat in the test case. The following code:
List<Task> tasks = jobTracker.getSetupAndCleanupTasks(ttStatus);
will always return null, only if ttStatus has tasks with FAILED_UNCLEAN status.