[SERVER-48605] options_parser_test.cpp is a beast Created: 05/Jun/20  Updated: 20/Mar/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
is testing SERVER-48367 envp may be unreliable in global init... Closed
Assigned Teams:
Service Arch
Participants:

 Description   

This cpp file is >5000 lines and takes well over 60sec to compile.
It's doing incredibly redundant copy-paste work.

I just had to make a change to the OptionParser API and edit hundreds of lines of repetitive usage. A simple refactor of the test would cut the redundancy, the build cost, and get us better test coverage.

Exploring the file, I find that several things are not tested that should be. When we test repeated fields, we test the elements we're interested in, but we do not check to see if any extra unexpected elements were in the results. We also don't do bounds checks on the results before looking at them. If containers were checked with a a function call, we would have no problem implementing a string check in one place and all the tests would benefit from it. Several examples in there.  OptionsParser is important to get right.



 Comments   
Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

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