-
Type: Sub-task
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
The approach to obtaining this coverage will be to use api extractor to generate a json file describing our driver's API. Then filter that api with the following conditions:
- symbol kind is Class
- releaseTag is Public
- for each symbol on the above filtered
- symbol kind is Method
- releaseTag is Public
- excerptTokens contains Promise (essentially determines if it's an i/o function)
- enforce unique names (deletes overrides)
- class has a non-zero number of methods
Using the above, create a test per API (preliminarily 188 tests) that await the result of each method and assert that a topology has been created on the MongoClient. The API can fail with MongoServerError, since that still indicates there was networking performed, and the topology should still have been created.
Double check to see if GridFS APIs are covered, they work via streams so won't be picked up by the promise filtering.
Inspect the APIs that do not match the above filtering (sync helpers, getters, etc.) and scan for anything that might be impacted by connect/not connected client state.
Make reasonable approximation that we’ve covered all the APIs that could be impacted since we don’t have the tooling to assert it definitively. The assumed risk is that a user may discover and hopefully report an API that behaves inconsistently that we may have missed. Which is risk we think is acceptable since the work around of explicit connection always exists and we can repair what ever was reported.