This assert in ShardServerCatalogCacheLoaderTest_PrimaryLoadFromShardedWithChangeOnMetadataFormatBecauseUpgrade is incorrect. Under particular interleaving of the unit test thread and ShardServerCatalogCacheLoader thread, it is can fail.
The test sets up a situation where the SSCCL has seen some chunks with their 'timestamp' field set, but the collection entry still without 'timestamp'. Later, the test expects the SSCCL to return the 'timestamp' set for those chunks that had it. This only works if the SSCCL has not persisted the chunks to disk yet (and in practice, in the test is very likely to not have persisted it).
If the SSCCL had time to persist the disk, it would have done it without the timestamp (as expected). Upon reading, the SSCCL will read the persisted chunks, then[ if the persisted collection had 'timestamp', it would add the 'timestamp' to the chunks|https://github.com/mongodb/mongo/blob/0d369af9f5be858fb06ed7c8013e05365288dcb0/src/mongo/db/s/shard_metadata_util.cpp#L302]. In the situation of the test, the collection still does not have 'timestamp', so the returned chunks wouldn't have it.
This is the expected behavior of the SSCCL, so the check needs to be removed.