Fixed test failures on 1.8.7 caused by 74e59ea
Merge pull request #9943 from fredwu/test_fix_for_74e59ea

Fixed test failures on 1.8.7 caused by 74e59ea