|
use the ConfigServerTestFixture to mock local writes to the config with ephemeralForTest, and the NetworkInterfaceMock to mock remote writes to the added shard
major cases to test:
- schedule an addShard task -> check that the shard receives the shardIdentity upsert over the network and the config receives the shard state update locally
- schedule an addShard task, and make the network return error for shardIdentity upsert -> check that task is rescheduled (shard receives shardIdentity upsert over the network and config receives the shard state locally)
- schedule two consecutive addShard tasks with the same shard info (simulate two 3.2 mongos's trying to add the same shard) -> check that only one proceeds to send network requests to upsert the shardIdentity doc
|