The unit test infrastructure should be reorganized slightly to prevent duplicate code in multiple fixtures.
Currently, this method is part of the ShardingState class, whose methods are either tested on the ShardingStateTest fixture or not unit tested.
This is largely because the ShardingStateTest fixture has neither:
- a network interface mock
- a storage engine mock
Rather than making ShardingStateTest yet another test fixture that implements functionality needed to use the NetworkInterfaceMock or ServiceContextMongoDTest (in its setUp() method), the sharding test fixtures should be reorganized for better inheritance and modularity.
See SERVER-25456 for details.
- depends on
-
SERVER-25456 suggestions for modularizing sharding unittest infrastructure
- Closed