From d3664dd00abfdda8c1819fbf4510510955763693 Mon Sep 17 00:00:00 2001 From: bjmb Date: Thu, 18 May 2017 19:02:29 -0400 Subject: [PATCH] Prevented hang in test_speculative_and_timeout --- tests/integration/standard/test_policies.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/standard/test_policies.py b/tests/integration/standard/test_policies.py index dc09382d..91f62df6 100644 --- a/tests/integration/standard/test_policies.py +++ b/tests/integration/standard/test_policies.py @@ -133,7 +133,8 @@ class SpecExecTest(BasicSharedKeyspaceUnitTestCase): # that's why we can't call session.execute,which would raise it, but # we have to directly wait for the event response_future = self.session.execute_async(statement, execution_profile='spec_ep_brr_lim', timeout=2.2) - response_future._event.wait() + response_future._event.wait(4) + self.assertIsInstance(response_future._final_exception, OperationTimedOut) # This is because 2.2 / 0.4 + 1 = 6 self.assertEqual(len(response_future.attempted_hosts), 6)