Modify test to consider MaxTasksPerNode configuration