'Test to ensure the timeout is honored when using speculative execution
@since 3.10
@jira_ticket PYTHON-750
@expected_result speculative retries be schedule every fixed period, during the maximum
period of the timeout.
@test_category metadata'

def test_speculative_and_timeout(self):

    prime_query('INSERT    INTO    test3rf.test    (k,    v)    VALUES    (0,    1);', then=NO_THEN)
    statement = SimpleStatement('INSERT    INTO    test3rf.test    (k,    v)    VALUES    (0,    1);', is_idempotent=True)
    response_future = self.session.execute_async(statement, execution_profile='spec_ep_brr_lim', timeout=2.2)
    response_future._event.wait(4)
    self.assertIsInstance(response_future._final_exception, OperationTimedOut)
    self.assertEqual(len(response_future.attempted_hosts), 6)
