From bbab8f2a3eac399ec4fa1f5e361d4f87b1bce41c Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Wed, 13 Feb 2019 17:17:56 -0800 Subject: [PATCH] Increate testcase timeout for VtsHalHealthStorageV1_0TargetTest The test is flaky with the current timeout and this CL increases it to a safe value. Bug: 120994008 Test: test passes Change-Id: I63e0e11fcc1eb3bed490cdb21193e2c332cccf80 --- .../vts/functional/VtsHalHealthStorageV1_0TargetTest.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/health/storage/1.0/vts/functional/VtsHalHealthStorageV1_0TargetTest.cpp b/health/storage/1.0/vts/functional/VtsHalHealthStorageV1_0TargetTest.cpp index 5ad561cef3..946e5f2470 100644 --- a/health/storage/1.0/vts/functional/VtsHalHealthStorageV1_0TargetTest.cpp +++ b/health/storage/1.0/vts/functional/VtsHalHealthStorageV1_0TargetTest.cpp @@ -36,7 +36,7 @@ using ::std::literals::chrono_literals::operator""ms; const uint64_t kDevGcTimeoutSec = 120; const std::chrono::seconds kDevGcTimeout{kDevGcTimeoutSec}; // Time accounted for RPC calls. -const std::chrono::milliseconds kRpcTime{100}; +const std::chrono::milliseconds kRpcTime{1000}; template std::string toString(std::chrono::duration time) { @@ -90,11 +90,8 @@ class GcCallback : public IGarbageCollectCallback, public Flag { template void waitForResult(std::chrono::duration timeout, Result expected) { std::unique_lock lock(mMutex); - if (waitLocked(&lock, timeout)) { - EXPECT_EQ(expected, mResult); - } else { - LOG(INFO) << "timeout after " << toString(timeout); - } + ASSERT_TRUE(waitLocked(&lock, timeout)) << "timeout after " << toString(timeout); + EXPECT_EQ(expected, mResult); } private: