summaryrefslogtreecommitdiffstats
path: root/src/test/osd
diff options
context:
space:
mode:
authorNitzanMordhai <nmordech@redhat.com>2022-08-09 11:37:13 +0200
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2022-08-09 11:58:25 +0200
commit245fa4883fae8d1e13614999ae01e2d71ae81809 (patch)
tree0aaab51442e2bbbf7c259153ec3b42dc16abe5e1 /src/test/osd
parentosd: trim dups regardless of their versions (diff)
downloadceph-245fa4883fae8d1e13614999ae01e2d71ae81809.tar.xz
ceph-245fa4883fae8d1e13614999ae01e2d71ae81809.zip
test/PGlog: cherry-pick PGLogTrimTest changes for size-based trimming
This commit brings the changes to the `PGLogTrimTest` that were a part of the initial fix for dups trimming issue (commit 0d253bcc09a5540fa6c724f6128fb7436ded5ec1) that got reverted in the meantime by 9bf0053bc99971c0e8591490acbdd635a5bb5145. Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
Diffstat (limited to 'src/test/osd')
-rw-r--r--src/test/osd/TestPGLog.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/osd/TestPGLog.cc b/src/test/osd/TestPGLog.cc
index d89b6309dac..b5d8915241c 100644
--- a/src/test/osd/TestPGLog.cc
+++ b/src/test/osd/TestPGLog.cc
@@ -2740,8 +2740,8 @@ TEST_F(PGLogTrimTest, TestPartialTrim)
EXPECT_EQ(eversion_t(19, 160), write_from_dups2);
EXPECT_EQ(2u, log.log.size());
EXPECT_EQ(1u, trimmed2.size());
- EXPECT_EQ(2u, log.dups.size());
- EXPECT_EQ(1u, trimmed_dups2.size());
+ EXPECT_EQ(3u, log.dups.size());
+ EXPECT_EQ(0u, trimmed_dups2.size());
}
@@ -3024,7 +3024,7 @@ TEST_F(PGLogTrimTest, TestTrimDups) {
EXPECT_EQ(eversion_t(20, 103), write_from_dups) << log;
EXPECT_EQ(2u, log.log.size()) << log;
- EXPECT_EQ(3u, log.dups.size()) << log;
+ EXPECT_EQ(4u, log.dups.size()) << log;
}
// This tests trim() to make copies of
@@ -3068,7 +3068,7 @@ TEST_F(PGLogTrimTest, TestTrimDups2) {
EXPECT_EQ(eversion_t(10, 100), write_from_dups) << log;
EXPECT_EQ(4u, log.log.size()) << log;
- EXPECT_EQ(5u, log.dups.size()) << log;
+ EXPECT_EQ(6u, log.dups.size()) << log;
}
// This tests copy_up_to() to make copies of