Fixed test to be more reliable.
Merged branch '2.9.x' into 'master'.