Fixed a flaky test: SlaveRecoveryTest.ShutdownSlave.

Review: https://reviews.apache.org/r/15664