(cherry-picked from the 7178096507) Picked up so tests from the 1.x-master would be more similar to this branch
7178096507