From 1abbc56abac20c3ed646532fdbbfb1daa4cf0ded Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Mon, 28 Sep 2020 12:11:17 -0700 Subject: [PATCH] Add version_builder_test to the list of ASSERT_STATUS_CHECKED tests (#7444) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7444 Test Plan: `ASSERT_STATUS_CHECKED=1 make version_builder_test -j24` Reviewed By: jay-zhuang Differential Revision: D23965793 Pulled By: ltamasi fbshipit-source-id: 8beaf66548379f21146189cda699d5f6fbb35a1b --- Makefile | 1 + db/version_builder_test.cc | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 7179ae309..2b224b9cc 100644 --- a/Makefile +++ b/Makefile @@ -631,6 +631,7 @@ ifdef ASSERT_STATUS_CHECKED block_cache_tracer_test \ cache_simulator_test \ sim_cache_test \ + version_builder_test \ version_edit_test \ work_queue_test \ write_controller_test \ diff --git a/db/version_builder_test.cc b/db/version_builder_test.cc index 5759151d7..513900de5 100644 --- a/db/version_builder_test.cc +++ b/db/version_builder_test.cc @@ -203,8 +203,8 @@ TEST_F(VersionBuilderTest, ApplyAndSaveTo) { VersionStorageInfo new_vstorage(&icmp_, ucmp_, options_.num_levels, kCompactionStyleLevel, nullptr, false); - version_builder.Apply(&version_edit); - version_builder.SaveTo(&new_vstorage); + ASSERT_OK(version_builder.Apply(&version_edit)); + ASSERT_OK(version_builder.SaveTo(&new_vstorage)); ASSERT_EQ(400U, new_vstorage.NumLevelBytes(2)); ASSERT_EQ(300U, new_vstorage.NumLevelBytes(3)); @@ -244,8 +244,8 @@ TEST_F(VersionBuilderTest, ApplyAndSaveToDynamic) { VersionStorageInfo new_vstorage(&icmp_, ucmp_, options_.num_levels, kCompactionStyleLevel, nullptr, false); - version_builder.Apply(&version_edit); - version_builder.SaveTo(&new_vstorage); + ASSERT_OK(version_builder.Apply(&version_edit)); + ASSERT_OK(version_builder.SaveTo(&new_vstorage)); ASSERT_EQ(0U, new_vstorage.NumLevelBytes(0)); ASSERT_EQ(100U, new_vstorage.NumLevelBytes(3)); @@ -290,8 +290,8 @@ TEST_F(VersionBuilderTest, ApplyAndSaveToDynamic2) { VersionStorageInfo new_vstorage(&icmp_, ucmp_, options_.num_levels, kCompactionStyleLevel, nullptr, false); - version_builder.Apply(&version_edit); - version_builder.SaveTo(&new_vstorage); + ASSERT_OK(version_builder.Apply(&version_edit)); + ASSERT_OK(version_builder.SaveTo(&new_vstorage)); ASSERT_EQ(0U, new_vstorage.NumLevelBytes(0)); ASSERT_EQ(100U, new_vstorage.NumLevelBytes(4)); @@ -339,8 +339,8 @@ TEST_F(VersionBuilderTest, ApplyMultipleAndSaveTo) { VersionStorageInfo new_vstorage(&icmp_, ucmp_, options_.num_levels, kCompactionStyleLevel, nullptr, false); - version_builder.Apply(&version_edit); - version_builder.SaveTo(&new_vstorage); + ASSERT_OK(version_builder.Apply(&version_edit)); + ASSERT_OK(version_builder.SaveTo(&new_vstorage)); ASSERT_EQ(500U, new_vstorage.NumLevelBytes(2)); @@ -386,7 +386,7 @@ TEST_F(VersionBuilderTest, ApplyDeleteAndSaveTo) { kInvalidBlobFileNumber, kUnknownOldestAncesterTime, kUnknownFileCreationTime, kUnknownFileChecksum, kUnknownFileChecksumFuncName); - version_builder.Apply(&version_edit); + ASSERT_OK(version_builder.Apply(&version_edit)); VersionEdit version_edit2; version_edit.AddFile(2, 808, 0, 100U, GetInternalKey("901"), @@ -401,9 +401,9 @@ TEST_F(VersionBuilderTest, ApplyDeleteAndSaveTo) { kInvalidBlobFileNumber, kUnknownOldestAncesterTime, kUnknownFileCreationTime, kUnknownFileChecksum, kUnknownFileChecksumFuncName); - version_builder.Apply(&version_edit2); - version_builder.SaveTo(&new_vstorage); + ASSERT_OK(version_builder.Apply(&version_edit2)); + ASSERT_OK(version_builder.SaveTo(&new_vstorage)); ASSERT_EQ(300U, new_vstorage.NumLevelBytes(2));