From 7c5173d27f4432fe7799f5fc7a85f857b61a3d6b Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Tue, 19 Aug 2014 13:45:12 -0700 Subject: [PATCH 1/2] test: db: fix test to have a smaller timeout for when it runs on faster hardware --- db/db_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index 9fb10335b..64486cec6 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -7411,7 +7411,7 @@ TEST(DBTest, SimpleWriteTimeoutTest) { ASSERT_OK(Put(Key(2), Key(2) + std::string(100000, 'v'), write_opt)); // As the only two write buffers are full in this moment, the third // Put is expected to be timed-out. - write_opt.timeout_hint_us = 300; + write_opt.timeout_hint_us = 3; ASSERT_TRUE( Put(Key(3), Key(3) + std::string(100000, 'v'), write_opt).IsTimedOut()); } From 0db6b028e7af37868f042a11d346b08790636d80 Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Tue, 26 Aug 2014 09:38:45 -0700 Subject: [PATCH 2/2] Update timeout to 50ms instead of 3. --- db/db_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index 64486cec6..7ef2eb822 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -7411,7 +7411,7 @@ TEST(DBTest, SimpleWriteTimeoutTest) { ASSERT_OK(Put(Key(2), Key(2) + std::string(100000, 'v'), write_opt)); // As the only two write buffers are full in this moment, the third // Put is expected to be timed-out. - write_opt.timeout_hint_us = 3; + write_opt.timeout_hint_us = 50; ASSERT_TRUE( Put(Key(3), Key(3) + std::string(100000, 'v'), write_opt).IsTimedOut()); }