From 1ebeffb0d8be47c9e37579d89a39968008df9b2e Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Mon, 6 Jun 2011 18:00:03 +0000 Subject: [PATCH] THRIFT-1197 TFileTransportTest.cpp fails on slower machines git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1132712 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/test/TFileTransportTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cpp/test/TFileTransportTest.cpp b/lib/cpp/test/TFileTransportTest.cpp index 6260094a..6dbe7c87 100644 --- a/lib/cpp/test/TFileTransportTest.cpp +++ b/lib/cpp/test/TFileTransportTest.cpp @@ -197,15 +197,15 @@ BOOST_AUTO_TEST_CASE(test_destructor) { int delta = time_diff(&start, &end); - // If any attempt takes more than 100ms, treat that as a failure. + // If any attempt takes more than 500ms, treat that as a failure. // Treat this as a fatal failure, so we'll return now instead of // looping over a very slow operation. - BOOST_REQUIRE_LT(delta, 100000); + BOOST_REQUIRE_LT(delta, 500000); - // Normally, it takes less than 1000us on my dev box. + // Normally, it takes less than 100ms on my dev box. // However, if the box is heavily loaded, some of the test runs // take longer, since we're just waiting for our turn on the CPU. - if (delta > 1000) { + if (delta > 100000) { ++num_over; } } @@ -332,7 +332,7 @@ BOOST_AUTO_TEST_CASE(test_noop_flush) { // Use a fatal fail so we break out early, rather than continuing to make // many more slow flush() calls. int delta = time_diff(&start, &now); - BOOST_REQUIRE_LT(delta, 500000); + BOOST_REQUIRE_LT(delta, 2000000); } } -- 2.17.1