Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47132

Unable to run tests from the shell due to undefined `jsTest.options(...).setParameters`

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • ALL
    • Hide

      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
      
      Show
      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

      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 = {};
      

            Assignee:
            william.schultz@mongodb.com William Schultz (Inactive)
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: