From 0b45a68c59d8cdad7b0fb38e115ab63f11ff65f2 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 4 Jun 2020 09:49:44 -0700 Subject: [PATCH] env_test */RunMany/* tests to run individually (#6931) Summary: When run */RunMany/* tests individually, e.g. ChrootEnvWithDirectIO/EnvPosixTestWithParam.RunMany/0, they hang. It's because they insert to background thread pool without initializing them. Fix it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6931 Test Plan: Run ChrootEnvWithDirectIO/EnvPosixTestWithParam.RunMany/0 by itself and see it passes. Reviewed By: riversand963 Differential Revision: D21875603 fbshipit-source-id: 7f848174c1a660254a2b1f7e11cca5370793ba30 --- env/env_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/env/env_test.cc b/env/env_test.cc index 62b823478..b2060ca95 100644 --- a/env/env_test.cc +++ b/env/env_test.cc @@ -327,6 +327,7 @@ TEST_P(EnvPosixTestWithParam, UnSchedule) { // run in any order. The purpose of the test is unclear. #ifndef OS_WIN TEST_P(EnvPosixTestWithParam, RunMany) { + env_->SetBackgroundThreads(1, Env::LOW); std::atomic last_id(0); struct CB {