YARN-2576. Making test patch pass in branch. Contributed by Subru Krishnan and Carlo Curino.