[tests] Increase test tolerance

This test has been flaky on mac.
This commit is contained in:
Thiago Marcos P. Santos
2019-11-27 03:00:39 +02:00
parent 2b6a0e48ee
commit 91d83accde

View File

@@ -98,7 +98,7 @@ TEST(OnlineFileSource, TEST_REQUIRES_SERVER(ConnectionError)) {
static int wait = 0;
const auto duration = std::chrono::duration<const double>(Clock::now() - start).count();
EXPECT_LT(wait - 0.01, duration) << "Backoff timer didn't wait 1 second";
EXPECT_GT(wait + 0.2, duration) << "Backoff timer fired too late";
EXPECT_GT(wait + 0.3, duration) << "Backoff timer fired too late";
ASSERT_NE(nullptr, res.error);
EXPECT_EQ(Response::Error::Reason::Connection, res.error->reason);
ASSERT_FALSE(res.data.get());