Fixed flaky ContenderDetectorShutdownNetwork test.

From: Jiang Yan Xu <yan@jxu.me>
Review: https://reviews.apache.org/r/15868