I'd like to discuss the unit test for this. I could essentially duplicate the same test that was added to the TestCapacityScheduler. However, it might be largely a copy-and-paste, and I'm not too happy about that but I could still do that. Do let me know your thoughts on this.
A larger question is, we have a large amount of generic RM unit tests out there, but they are exercised only against the capacity scheduler. Should we try to find ways to exercise them against the fair scheduler as well? That would be the most effective way of ensuring the soundness of any changes.