From 816ae098ea048ba80bc90b41f38b5b0d144bae4d Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Mon, 11 Jul 2016 13:33:52 -0700 Subject: [PATCH] fix test failure Summary: fix Rocksdb Unit Test USER_FAILURE Test Plan: make all check -j64 Reviewers: sdong, andrewkr Reviewed By: andrewkr Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D60603 --- db/db_sst_test.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/db_sst_test.cc b/db/db_sst_test.cc index 8616caaf2..975bf6198 100644 --- a/db/db_sst_test.cc +++ b/db/db_sst_test.cc @@ -1118,13 +1118,13 @@ TEST_F(DBSSTTest, AddExternalSstFileListAtomicity) { // files[1].sst (100 => 199) // ... // file[8].sst (800 => 899) - size_t n = 9; + int n = 9; std::vector files(n); std::vector files_info(n); - for (size_t i = 0; i < n; i++) { + for (int i = 0; i < n; i++) { files[i] = sst_files_folder + "file" + std::to_string(i) + ".sst"; ASSERT_OK(sst_file_writer.Open(files[i])); - for (size_t k = i * 100; k < (i + 1) * 100; k++) { + for (int k = i * 100; k < (i + 1) * 100; k++) { ASSERT_OK(sst_file_writer.Add(Key(k), Key(k) + "_val")); } Status s = sst_file_writer.Finish(&files_info[i]); @@ -1137,12 +1137,12 @@ TEST_F(DBSSTTest, AddExternalSstFileListAtomicity) { files.push_back(sst_files_folder + "file" + std::to_string(n) + ".sst"); auto s = db_->AddFile(files); ASSERT_NOK(s) << s.ToString(); - for (size_t k = 0; k < n * 100; k++) { + for (int k = 0; k < n * 100; k++) { ASSERT_EQ("NOT_FOUND", Get(Key(k))); } s = db_->AddFile(files_info); ASSERT_OK(s); - for (size_t k = 0; k < n * 100; k++) { + for (int k = 0; k < n * 100; k++) { std::string value = Key(k) + "_val"; ASSERT_EQ(Get(Key(k)), value); }