[SERVER-47132] Unable to run tests from the shell due to undefined `jsTest.options(...).setParameters` Created: 26/Mar/20  Updated: 26/Mar/20  Resolved: 26/Mar/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: William Schultz (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-47053 Relax oplog application constraints i... Closed
Operating System: ALL
Steps To Reproduce:

As of time of creation of this ticket the top of master is this commit.

D:\workspace\mongodb-master>.\mongo.exe --eval "MongoRunner.dataPath = 'D:/Temp/Data/shell/'; MongoRunner.dataDir = 'D:/Temp/Data/shell/';" --shell --nodb
{"t":{"$date":"2020-03-26T13:24:01.175Z"},"s":"I", "c":"NETWORK", "id":4648602,"ctx":"main","msg":"Implicit TCP FastOpen in use."}
MongoDB shell version v0.0.0
type "help" for help
D:/Temp/Data/shell/
> var st = new ShardingTest({config:1});
Starting new replica set __unknown_name__-rs0
ShardingTest starting replica set for shard: __unknown_name__-rs0
ReplSetTest starting set '__unknown_name__-rs0'
ReplSetTest n is : 0
{
        "useHostName" : true,
        "oplogSize" : 16,
        "keyFile" : undefined,
        "port" : 20000,
        "replSet" : "__unknown_name__-rs0",
        "dbpath" : "$set-$node",
        "useHostname" : true,
        "shardsvr" : "",
        "pathOpts" : {
                "testName" : "__unknown_name__",
                "shard" : 0,
                "node" : 0,
                "set" : "__unknown_name__-rs0"
        },
        "setParameter" : {
                "migrationLockAcquisitionMaxWaitMS" : 30000,
                "writePeriodicNoops" : false,
                "numInitialSyncConnectAttempts" : 60
        },
        "waitForConnect" : false,
        "restart" : undefined
}
ReplSetTest Starting....
Resetting db path 'D:/Temp/Data/shell/__unknown_name__-rs0-0'
uncaught exception: TypeError: jsTest.options(...).setParameters is undefined :
appendSetParameterArgs@src/mongo/shell/servers.js:1175:21
MongoRunner._startWithArgs@src/mongo/shell/servers.js:1327:16
MongoRunner.runMongod@src/mongo/shell/servers.js:866:18
ReplSetTest/this.start<@src/mongo/shell/replsettest.js:2822:20
_nodeParamToId/<@src/mongo/shell/replsettest.js:231:45
_nodeParamToSingleNode/<@src/mongo/shell/replsettest.js:250:45
ReplSetTest/this.startSetAsync@src/mongo/shell/replsettest.js:631:13
ShardingTest@src/mongo/shell/shardingtest.js:1318:53
@(shell):1:10

Participants:

 Description   

It looks like the ability to run JS tests from the shell (without going through resmoke.py) is broken due to the error below. This impacts local development and testing:

> var st = new ShardingTest({config:1});
Starting new replica set __unknown_name__-rs0
ShardingTest starting replica set for shard: __unknown_name__-rs0
ReplSetTest starting set '__unknown_name__-rs0'
ReplSetTest n is : 0
{
        "useHostName" : true,
        "oplogSize" : 16,
        "keyFile" : undefined,
        "port" : 20000,
        "replSet" : "__unknown_name__-rs0",
        "dbpath" : "$set-$node",
        "useHostname" : true,
        "shardsvr" : "",
        "pathOpts" : {
                "testName" : "__unknown_name__",
                "shard" : 0,
                "node" : 0,
                "set" : "__unknown_name__-rs0"
        },
        "setParameter" : {
                "migrationLockAcquisitionMaxWaitMS" : 30000,
                "writePeriodicNoops" : false,
                "numInitialSyncConnectAttempts" : 60
        },
        "waitForConnect" : false,
        "restart" : undefined
}
ReplSetTest Starting....
Resetting db path 'D:/Temp/Data/shell/__unknown_name__-rs0-0'
uncaught exception: TypeError: jsTest.options(...).setParameters is undefined :
appendSetParameterArgs@src/mongo/shell/servers.js:1175:21
MongoRunner._startWithArgs@src/mongo/shell/servers.js:1327:16
MongoRunner.runMongod@src/mongo/shell/servers.js:866:18
ReplSetTest/this.start<@src/mongo/shell/replsettest.js:2822:20
_nodeParamToId/<@src/mongo/shell/replsettest.js:231:45
_nodeParamToSingleNode/<@src/mongo/shell/replsettest.js:250:45
ReplSetTest/this.startSetAsync@src/mongo/shell/replsettest.js:631:13
ShardingTest@src/mongo/shell/shardingtest.js:1318:53
@(shell):1:10

It looks like this is due to unchecked reference to here.

The workaround for now is to run this before attempting to execute line from any test:

jsTest.options().setParameters = {};



 Comments   
Comment by Kaloian Manassiev [ 26/Mar/20 ]

Fixed as commit under SERVER-47053, which introduced it originally.

Comment by William Schultz (Inactive) [ 26/Mar/20 ]

kaloian.manassiev I can push a fix for this since it was broken by my recent commit in SERVER-47053.

Generated at Thu Feb 08 05:13:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.