Skip to content

Commit

Permalink
Unit tests: Enable DBIOFailureTest.DropWrites (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrambacher authored and udi-speedb committed Dec 5, 2023
1 parent 20e8548 commit 3f87e1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db/db_io_failure_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DBIOFailureTest : public DBTestBase {
};

// Check that number of files does not grow when writes are dropped
TEST_F(DBIOFailureTest, DISABLED_DropWrites) {
TEST_F(DBIOFailureTest, DropWrites) {
do {
Options options = CurrentOptions();
options.env = env_;
Expand All @@ -30,7 +30,7 @@ TEST_F(DBIOFailureTest, DISABLED_DropWrites) {
ASSERT_OK(Put("foo", "v1"));
ASSERT_EQ("v1", Get("foo"));
Compact("a", "z");
const size_t num_files = CountFiles();
const auto num_files = GetSstFileCount(dbname_);
// Force out-of-space errors
env_->drop_writes_.store(true, std::memory_order_release);
env_->sleep_counter_.Reset();
Expand Down Expand Up @@ -59,7 +59,7 @@ TEST_F(DBIOFailureTest, DISABLED_DropWrites) {
ASSERT_EQ("5", property_value);

env_->drop_writes_.store(false, std::memory_order_release);
const size_t count = CountFiles();
const auto count = GetSstFileCount(dbname_);
ASSERT_LT(count, num_files + 3);

// Check that compaction attempts slept after errors
Expand Down

0 comments on commit 3f87e1a

Please sign in to comment.