Skip to content

Commit

Permalink
Fixed valgrind error in DBTest.CompressedCache
Browse files Browse the repository at this point in the history
Summary:
Fixed valgrind error in DBTest.CompressedCache.
This fixes the valgrind error (thanks to Haobo). I am still trying to reproduce the test-failure case deterministically.

Test Plan: db_test

Reviewers: haobo

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D13899
  • Loading branch information
dhruba committed Nov 5, 2013
1 parent f837f5b commit 7845fd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1797,12 +1797,12 @@ TEST(DBTest, CompressedCache) {
// Write 8MB (80 values, each 100K)
ASSERT_EQ(NumTableFilesAtLevel(0), 0);
std::vector<std::string> values;
Slice str;
std::string str;
for (int i = 0; i < num_iter; i++) {
if (i % 4 == 0) { // high compression ratio
str = RandomString(&rnd, 100000);
}
values.push_back(str.ToString(true));
values.push_back(str);
ASSERT_OK(Put(Key(i), values[i]));
}

Expand Down

0 comments on commit 7845fd9

Please sign in to comment.