[SERVER-13603] Test suites with options tests fail when run with --nopreallocj Created: 15/Apr/14  Updated: 11/Mar/15  Resolved: 07/May/14

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

Type: Bug Priority: Major - P3
Reporter: Kyle Erf Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Backport Completed:
Steps To Reproduce:

run smoke.py --nopreallocj on replication, durabililty, disk, auth, noPassthrough, or sharding tests suites

Sprint: Server 2.7.1
Participants:

 Description   

Some of the jstests specifically test option passing. Most extra mongod flags are removed, but --nopreallocj is not currently handled this way. When running smoke with that flag, these options tests fail because nopreallocj pollutes the options object:

assert: [{ "nopreallocj" : true, "replication" : { "replSet" : "mycmdlinename" } }] != [{ "replication" : { "replSet" : "mycmdlinename" } }] are not equal : undefined
Error: [{ "nopreallocj" : true, "replication" : { "replSet" : "mycmdlinename" } }] != [{ "replication" : { "replSet" : "mycmdlinename" } }] are not equal : undefined
    at Error (<anonymous>)
    at doassert (src/mongo/shell/assert.js:11:14)
    at Function.assert.docEq (src/mongo/shell/assert.js:102:5)
    at testGetCmdLineOpts (D:\data\mci\shell\mongodb-mongo-master\jstests\repl\repl_options.js:26:12)
    at D:\data\mci\shell\mongodb-mongo-master\jstests\repl\repl_options.js:40:1

A quick audit suggests that these files need to be fixed:
./noPassthrough/profile_options.js
./noPassthrough/network_options.js
./noPassthrough/logging_options.js
./sharding/sharding_options.js
./dur/journaling_options.js
./disk/datafile_options.js
./disk/index_options.js
./core/regex_options.js
./repl/repl_options.js
./auth/auth_options.js

These files tend to have a helper function at the top that removes testing options from the options object. The fix for this would likely just involve updating these helpers--though it might be nice to throw that helper function into libs/, since it's a lot of duplicated code.



 Comments   
Comment by Githook User [ 17/May/14 ]

Author:

{u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}

Message: SERVER-13603 Move option testing support code into shared test helper
(cherry picked from commit f7d78f9511d3e4fa156d6f94322f5a690a21bc20)
Branch: v2.6
https://github.com/mongodb/mongo/commit/013e21bbe58c4d345df61576fb3cafe41c2ae49c

Comment by Githook User [ 22/Apr/14 ]

Author:

{u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}

Message: SERVER-13603 Move option testing support code into shared test helper
Branch: master
https://github.com/mongodb/mongo/commit/f7d78f9511d3e4fa156d6f94322f5a690a21bc20

Generated at Thu Feb 08 03:32:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.