From 1cecd22de9b036002b3f349bd2a77dd014036070 Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 24 Jan 2022 12:49:03 -0800 Subject: [PATCH] Increase wait time within EnvPosixTestWithParam.RunMany (#9413) Summary: We see: [ RUN ] ChrootEnvWithDirectIO/EnvPosixTestWithParam.RunMany/0 env/env_test.cc:464: Failure Expected equality of these values: 4 cur Which is: 0 The suspicious is that the wait time is not long enough. Increase the wait time to 10s and allows earlier check. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9413 Test Plan: Run the test Reviewed By: riversand963 Differential Revision: D33697715 fbshipit-source-id: 3d71715562a8cceb694b773276dd9e4e451a18bc --- env/env_test.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/env/env_test.cc b/env/env_test.cc index 287b4f442..7333df580 100644 --- a/env/env_test.cc +++ b/env/env_test.cc @@ -459,10 +459,8 @@ TEST_P(EnvPosixTestWithParam, RunMany) { env_->Schedule(&CB::Run, &cb3); env_->Schedule(&CB::Run, &cb4); - Env::Default()->SleepForMicroseconds(kDelayMicros); - int cur = last_id.load(std::memory_order_acquire); - ASSERT_EQ(4, cur); WaitThreadPoolsEmpty(); + ASSERT_EQ(4, last_id.load(std::memory_order_acquire)); } #endif