File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1616 } ) ;
1717
1818 // 2 should be master (give this a while to happen, as other nodes might first be elected)
19- replTest . waitForState ( nodes [ 2 ] , ReplSetTest . State . PRIMARY ) ;
19+ replTest . awaitNodesAgreeOnPrimary ( replTest . kDefaultTimeoutMS , nodes , 2 ) ;
20+
2021 // wait for 1 to not appear to be master (we are about to make it master and need a clean slate
2122 // here)
2223 replTest . waitForState ( nodes [ 1 ] , ReplSetTest . State . SECONDARY ) ;
4243
4344 // bring 2 back up, 2 should wait until caught up and then become master
4445 replTest . restart ( 2 ) ;
45- replTest . waitForState ( nodes [ 2 ] , ReplSetTest . State . PRIMARY ) ;
46+ replTest . awaitNodesAgreeOnPrimary ( replTest . kDefaultTimeoutMS , nodes , 2 ) ;
4647
4748 // make sure nothing was rolled back
4849 master = replTest . getPrimary ( ) ;
You can’t perform that action at this time.
0 commit comments