// Check that all partitions timed out up to maxAttempts
JobContext ctx = TaskUtil.getJobContext(_manager, TaskUtil.getNamespacedJobName(jobResource));
int maxAttempts = 0;
for (int i = 0; i < NUM_PARTITIONS; i++) {
TaskPartitionState state = ctx.getPartitionState(i);
if (state != null) {
Assert.assertEquals(state, TaskPartitionState.TIMED_OUT);
maxAttempts = Math.max(maxAttempts, ctx.getPartitionNumAttempts(i));
}
}