-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
2
batch_write_op_test.cpp and bulk_write_exec_test.cpp have several (most) test cases that set the mocked shards versions as ShardVersion::IGNORED (e.g. here). This is not representative of the real world – shards never have ShardVersion::IGNORED as their current shardVersion; ShardVersion::IGNORED is just a special version that routers attach when they do not want the shard to do shard version checking.
As a consequence, several of the test cases do not match the reality. As an example, this test case asserts that the operation is executed in a single batch. However, it reality it will be two batches because the targeted writes will be targeted with a proper ShardVersion, and the broadcasted ones with ShardVersion::IGNORED.
An example of a well-written test case setup is this one.