jstests/free_mon/libs/free_mon.js
/**
 * Wait for registration information to be populated in the database.
 *
 * @param {object} conn
 * @param {string} state
 */
Wait for registration information to be populated in the database.
@param {object} conn
@param {string} state
Wait for registration information to be populated in the database . @param { object } conn @param { string } state
function WaitForDiskState(conn, state) {
    'use strict';
    const admin = conn.getDB("admin");
    assert.soon(function() {
        const docs = admin.system.version.find({_id: "free_monitoring"});
        const da = docs.toArray();
        return da.length === 1 && da[0].state === state;
    }, "Failed to disk state", 60 * 1000);
}
function WaitForDiskState ( conn , state ) { 'use strict' ; const admin = conn . getDB ( "admin" ) ; assert . soon ( function ( ) { const docs = admin . system . version . find ( { _id : "free_monitoring" } ) ; const da = docs . toArray ( ) ; return da . length === 1 && da [ 0 ] . state === state ; } , "Failed to disk state" , 60 * 1000 ) ; }
Wait for registration information to be populated in the database.
Wait for registration information to be populated in the database .
// Wait for registration to occur