Deflake CompactionServiceTest.BasicCompactions (#10697)

Summary:
The background compaction may still running while the test end, which would cause ASAN stack-use-after-scope error.
Explicitly close the DB before test end.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10697

Test Plan:
able to reproduce with:
```
gtest-parallel ./compaction_service_test --gtest_filter=CompactionServiceTest.BasicCompactions -r 10000 -w 100
```

Reviewed By: gitbw95

Differential Revision: D39590974

Pulled By: jay-zhuang

fbshipit-source-id: da264b2e6a276afbda7d5ff7adb9d7b8d4213d90
main
Jay Zhuang 2 years ago committed by Facebook GitHub Bot
parent 2b6f3510c2
commit 92df36985d
  1. 1
      db/compaction/compaction_service_test.cc

@ -325,6 +325,7 @@ TEST_F(CompactionServiceTest, BasicCompactions) {
}); });
Reopen(options); Reopen(options);
ASSERT_GT(verify_passed, 0); ASSERT_GT(verify_passed, 0);
Close();
} }
TEST_F(CompactionServiceTest, ManualCompaction) { TEST_F(CompactionServiceTest, ManualCompaction) {

Loading…
Cancel
Save