Have masterelection_test wait on the leadership.