File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -46,20 +46,19 @@ var checkNoChaining = function() {
4646} ;
4747
4848var forceSync = function ( ) {
49+ var config ;
50+ try {
51+ config = nodes [ 2 ] . getDB ( "local" ) . system . replset . findOne ( ) ;
52+ } catch ( e ) {
53+ config = nodes [ 2 ] . getDB ( "local" ) . system . replset . findOne ( ) ;
54+ }
55+ var targetHost = config . members [ 1 ] . host ;
56+ printjson ( nodes [ 2 ] . getDB ( "admin" ) . runCommand ( { replSetSyncFrom : targetHost } ) ) ;
4957 assert . soon (
5058 function ( ) {
51- var config = nodes [ 2 ] . getDB ( "local" ) . system . replset . findOne ( ) ;
52- var targetHost = config . members [ 1 ] . host ;
53- printjson ( nodes [ 2 ] . getDB ( "admin" ) . runCommand ( { replSetSyncFrom : targetHost } ) ) ;
54- assert . soon (
55- function ( ) {
56- return nodes [ 2 ] . getDB ( "test" ) . foo . findOne ( ) != null ;
57- } ,
58- 'Check for data after force sync' , 5000
59- ) ;
6059 return nodes [ 2 ] . getDB ( "test" ) . foo . findOne ( ) != null ;
6160 } ,
62- 'Check force sync still works '
61+ 'Check for data after force sync '
6362 ) ;
6463} ;
6564
You can’t perform that action at this time.
0 commit comments