3
3
* isMaster and ismaster.
4
4
* @tags : [requires_replication]
5
5
*/
6
- import { configureFailPoint , getFailPointName } from "jstests/libs/fail_point_util.js" ;
6
+ import { configureFailPoint } from "jstests/libs/fail_point_util.js" ;
7
7
import { funWithArgs } from "jstests/libs/parallel_shell_helpers.js" ;
8
8
import { ReplSetTest } from "jstests/libs/replsettest.js" ;
9
9
import { ShardingTest } from "jstests/libs/shardingtest.js" ;
@@ -200,27 +200,26 @@ function runTest(db, cmd, logFailpoint, failpointName) {
200
200
201
201
// Set command log verbosity to 0 to avoid logging *all* commands in the "slow query" log.
202
202
const conn = MongoRunner . runMongod ( { setParameter : { logComponentVerbosity : tojson ( { command : 0 } ) } } ) ;
203
- const shardWaitInHello = getFailPointName ( "shardWaitInHello" , conn . getMaxWireVersion ( ) ) ;
204
203
assert . neq ( null , conn , "mongod was unable to start up" ) ;
205
- runTest ( conn . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , shardWaitInHello ) ;
206
- runTest ( conn . getDB ( "admin" ) , "isMaster" , "waitForIsMasterCommandLogged" , shardWaitInHello ) ;
207
- runTest ( conn . getDB ( "admin" ) , "ismaster" , "waitForIsMasterCommandLogged" , shardWaitInHello ) ;
204
+ runTest ( conn . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , " shardWaitInHello" ) ;
205
+ runTest ( conn . getDB ( "admin" ) , "isMaster" , "waitForIsMasterCommandLogged" , " shardWaitInHello" ) ;
206
+ runTest ( conn . getDB ( "admin" ) , "ismaster" , "waitForIsMasterCommandLogged" , " shardWaitInHello" ) ;
208
207
MongoRunner . stopMongod ( conn ) ;
209
208
210
209
const replTest = new ReplSetTest (
211
210
{ nodes : 1 , nodeOptions : { setParameter : { logComponentVerbosity : tojson ( { command : 0 } ) } } } ) ;
212
211
replTest . startSet ( ) ;
213
212
replTest . initiate ( ) ;
214
213
runTest (
215
- replTest . getPrimary ( ) . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , shardWaitInHello ) ;
214
+ replTest . getPrimary ( ) . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , " shardWaitInHello" ) ;
216
215
runTest ( replTest . getPrimary ( ) . getDB ( "admin" ) ,
217
216
"isMaster" ,
218
217
"waitForIsMasterCommandLogged" ,
219
- shardWaitInHello ) ;
218
+ " shardWaitInHello" ) ;
220
219
runTest ( replTest . getPrimary ( ) . getDB ( "admin" ) ,
221
220
"ismaster" ,
222
221
"waitForIsMasterCommandLogged" ,
223
- shardWaitInHello ) ;
222
+ " shardWaitInHello" ) ;
224
223
replTest . stopSet ( ) ;
225
224
226
225
const st = new ShardingTest ( {
@@ -229,8 +228,7 @@ const st = new ShardingTest({
229
228
config : 1 ,
230
229
other : { mongosOptions : { setParameter : { logComponentVerbosity : tojson ( { command : 0 } ) } } }
231
230
} ) ;
232
- const fpName = getFailPointName ( "routerWaitInHello" , st . s . getMaxWireVersion ( ) ) ;
233
- runTest ( st . s . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , fpName ) ;
234
- runTest ( st . s . getDB ( "admin" ) , "isMaster" , "waitForIsMasterCommandLogged" , fpName ) ;
235
- runTest ( st . s . getDB ( "admin" ) , "ismaster" , "waitForIsMasterCommandLogged" , fpName ) ;
231
+ runTest ( st . s . getDB ( "admin" ) , "hello" , "waitForHelloCommandLogged" , "routerWaitInHello" ) ;
232
+ runTest ( st . s . getDB ( "admin" ) , "isMaster" , "waitForIsMasterCommandLogged" , "routerWaitInHello" ) ;
233
+ runTest ( st . s . getDB ( "admin" ) , "ismaster" , "waitForIsMasterCommandLogged" , "routerWaitInHello" ) ;
236
234
st . stop ( ) ;
0 commit comments