[SERVER-31619] ReplSetTest.initiate throws `TypeError: TestData is undefined` if used outside of resmoke Created: 18/Oct/17  Updated: 30/Oct/23  Resolved: 18/Oct/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.6.0-rc0
Fix Version/s: 3.6.0-rc1

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

If ReplSetTest.initiate is called directly through the shell (not through resmoke), it throws the following exception:

__unknown_name__:PRIMARY> rs.initiate();
...
2017-10-18T09:31:29.596-0400 E QUERY    [thread1] TypeError: TestData is undefined
ReplSetTest/this.initiateWithAnyNodeAsPrimary@src/mongo/shell/replsettest.js:944:1
ReplSetTest/this.initiateWithNodeZeroAsPrimary@src/mongo/shell/replsettest.js:969:9
ReplSetTest/this.initiate@src/mongo/shell/replsettest.js:983:9
@(shell):1:1



 Comments   
Comment by William Schultz (Inactive) [ 18/Oct/17 ]

Should be fixed by this commit: https://github.com/mongodb/mongo/commit/599104d062bb96866babe4cafe39f2efae85c983

Comment by William Schultz (Inactive) [ 18/Oct/17 ]

This issue was introduced by my first commit on SERVER-31413. It will be fixed in a follow up commit. The issue is that we are checking a field of TestData directly without checking it via jsTestOptions(), which checks if TestData is defined.

Comment by Judah Schvimer [ 18/Oct/17 ]

This appears to have been introduced by https://github.com/mongodb/mongo/commit/ace70199e883ef5e3ae42eea3f2d64b0854e88ce

Generated at Thu Feb 08 04:27:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.