Skip to content

Commit

Permalink
Retry cirq_google tests that have flaky CI failures on TimeoutError
Browse files Browse the repository at this point in the history
Some tests in cirq_google.engine.stream_manager_test have
non-reproducible TimeoutError failures on CI runners, which
go away on retry.  Here we retry them by default.

Fixes #6741
  • Loading branch information
pavoljuhas committed Oct 2, 2024
1 parent f5d7cc8 commit 5362437
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cirq-google/cirq_google/engine/stream_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import pytest
import google.api_core.exceptions as google_exceptions

import cirq
from cirq_google.engine.asyncio_executor import AsyncioExecutor
from cirq_google.engine.stream_manager import (
_get_retry_request_or_raise,
Expand Down Expand Up @@ -368,6 +369,7 @@ async def test():
],
)
@mock.patch.object(quantum, 'QuantumEngineServiceAsyncClient', autospec=True)
@cirq.testing.retry_once_after_timeout
def test_submit_with_retryable_stream_breakage_expects_get_result_request(
self, client_constructor, error
):
Expand Down Expand Up @@ -407,6 +409,7 @@ async def test():
],
)
@mock.patch.object(quantum, 'QuantumEngineServiceAsyncClient', autospec=True)
@cirq.testing.retry_once_after_timeout
def test_submit_with_non_retryable_stream_breakage_raises_error(
self, client_constructor, error
):
Expand Down

0 comments on commit 5362437

Please sign in to comment.