YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful machine. Contributed by Zhijie Shen

(cherry picked from commit b0b52c4e11336ca2ad6a02d64c0b5d5a8f1339ae)
(cherry picked from commit 4aa98d599194a444c9d2e1fe95262e32bf744d35)