public void waitForNewMaster ( int timeoutMs ) throws TimeoutException , InterruptedException { CommonUtils . waitFor ( "the new leader master to start" , ( ) -> getLeaderIndex ( ) != - 1 , WaitForOptions . defaults ( ) . setTimeoutMs ( timeoutMs ) ) ; }
Waits for a new master to start until a timeout occurs .