diff options
author | Allison Easton <allison.easton@mongodb.com> | 2021-10-08 09:58:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-08 10:22:09 +0000 |
commit | 8679a54bd8780fdbe1cb6a052f70a494cd4205e5 (patch) | |
tree | 658ccb979bfe0726b8985ed1879932c54265ce00 /src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp | |
parent | ad809cbc37db74ac0c3e1f95456ccdd38e1a7486 (diff) | |
download | mongo-8679a54bd8780fdbe1cb6a052f70a494cd4205e5.tar.gz |
SERVER-60378 Rewrite some sharding tests to avoid using chunk versions with Timestamp(0, 0)
Diffstat (limited to 'src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp')
-rw-r--r-- | src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp index 4c49d7e5943..1c5f4610361 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_assign_key_range_to_zone_test.cpp @@ -62,7 +62,7 @@ public: setupShards({shard}); CollectionType shardedCollection( - shardedNS(), OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + shardedNS(), OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1)); ASSERT_OK(insertToConfigCollection( @@ -260,7 +260,7 @@ TEST_F(AssignKeyRangeToZoneTestFixture, RemoveZoneWithDollarPrefixedShardKeysSho TEST_F(AssignKeyRangeToZoneTestFixture, MinThatIsAShardKeyPrefixShouldConvertToFullShardKey) { NamespaceString ns("compound.shard"); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1 << "y" << 1)); ASSERT_OK(insertToConfigCollection( @@ -277,7 +277,7 @@ TEST_F(AssignKeyRangeToZoneTestFixture, MinThatIsAShardKeyPrefixShouldConvertToF TEST_F(AssignKeyRangeToZoneTestFixture, MaxThatIsAShardKeyPrefixShouldConvertToFullShardKey) { NamespaceString ns("compound.shard"); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1 << "y" << 1)); ASSERT_OK(insertToConfigCollection( @@ -329,7 +329,7 @@ TEST_F(AssignKeyRangeToZoneTestFixture, MinMaxThatIsNotAShardKeyPrefixShouldFail TEST_F(AssignKeyRangeToZoneTestFixture, MinMaxThatIsAShardKeyPrefixShouldSucceed) { NamespaceString ns("compound.shard"); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1 << "y" << 1)); ASSERT_OK(insertToConfigCollection( @@ -372,7 +372,7 @@ TEST_F(AssignKeyRangeToZoneTestFixture, TimeseriesCollMustHaveTimeKeyRangeMinKey const std::string controlTimeField = timeseries::kControlMinFieldNamePrefix.toString() + timeField; const TimeseriesOptions timeseriesOptions(timeField.toString()); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); TypeCollectionTimeseriesFields timeseriesFields; timeseriesFields.setTimeseriesOptions(timeseriesOptions); shardedCollection.setTimeseriesFields(timeseriesFields); @@ -523,7 +523,7 @@ TEST_F(AssignKeyRangeWithOneRangeFixture, NewRangeOverlappingInsideExistingShoul */ TEST_F(AssignKeyRangeWithOneRangeFixture, NewRangeOverlappingWithDifferentNSShouldSucceed) { CollectionType shardedCollection( - NamespaceString("other.coll"), OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + NamespaceString("other.coll"), OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1)); ASSERT_OK(insertToConfigCollection( @@ -743,7 +743,7 @@ TEST_F(AssignKeyRangeWithOneRangeFixture, RemoveWithInvalidMaxShardKeyShouldFail TEST_F(AssignKeyRangeWithOneRangeFixture, RemoveWithPartialMinPrefixShouldRemoveRange) { NamespaceString ns("compound.shard"); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1 << "y" << 1)); ASSERT_OK(insertToConfigCollection( @@ -766,7 +766,7 @@ TEST_F(AssignKeyRangeWithOneRangeFixture, RemoveWithPartialMinPrefixShouldRemove TEST_F(AssignKeyRangeWithOneRangeFixture, RemoveWithPartialMaxPrefixShouldRemoveRange) { NamespaceString ns("compound.shard"); - CollectionType shardedCollection(ns, OID::gen(), Timestamp(), Date_t::now(), UUID::gen()); + CollectionType shardedCollection(ns, OID::gen(), Timestamp(1, 1), Date_t::now(), UUID::gen()); shardedCollection.setKeyPattern(BSON("x" << 1 << "y" << 1)); ASSERT_OK(insertToConfigCollection( |