Try to fix sizes in unit test

This commit is contained in:
Robert Schulze 2023-09-15 09:32:43 +00:00
parent 9fc3d8d90d
commit 603b3c4b26
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -1321,24 +1321,24 @@ TEST_P(CoordinationTest, SnapshotableHashMapDataSize)
world.disableSnapshotMode();
world.insert("world", n1);
EXPECT_EQ(world.getApproximateDataSize(), 193);
EXPECT_EQ(world.getApproximateDataSize(), 209);
world.updateValue("world", [&](Node & value) { value = n2; });
EXPECT_EQ(world.getApproximateDataSize(), 211);
EXPECT_EQ(world.getApproximateDataSize(), 227);
world.erase("world");
EXPECT_EQ(world.getApproximateDataSize(), 0);
world.enableSnapshotMode(100000);
world.insert("world", n1);
EXPECT_EQ(world.getApproximateDataSize(), 193);
EXPECT_EQ(world.getApproximateDataSize(), 209);
world.updateValue("world", [&](Node & value) { value = n2; });
EXPECT_EQ(world.getApproximateDataSize(), 404);
EXPECT_EQ(world.getApproximateDataSize(), 436);
world.clearOutdatedNodes();
EXPECT_EQ(world.getApproximateDataSize(), 211);
EXPECT_EQ(world.getApproximateDataSize(), 227);
world.erase("world");
EXPECT_EQ(world.getApproximateDataSize(), 211);
EXPECT_EQ(world.getApproximateDataSize(), 227);
world.clear();
EXPECT_EQ(world.getApproximateDataSize(), 0);