-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
ClusterCommandTestFixture is a test fixture that lets us implement C++ unit tests that exercise router code by mocking responses from the shards. It's super useful for testing code changes without having to write a JS test.
Despite its utility, from personal experience, this fixture makes it challenging to write tests, since the test can hang quite easily:
- If the test queues up mock shard responses that are never consumed by the router, the test hangs. Note that this is true even if router code throws an exception, and the exception is not surfaced.
- If the test doesn't queue up enough shard responses, then the test will hang.
It would be great to show this fixture some love. Even just adding a timeout to the fixture would help a lot with writing tests.