Skip to content

Commit 268c4c2

Browse files
committed
test(spanner): fix flaky restore backup sample test
1 parent 1c9244b commit 268c4c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spanner/cloud-client/backup_sample_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414
import uuid
1515

16+
from google.api_core.exceptions import DeadlineExceeded
17+
from test_utils.retry import RetryErrors
1618
from google.cloud import spanner
1719
import pytest
1820

@@ -67,6 +69,7 @@ def test_create_backup(capsys, database):
6769
assert BACKUP_ID in out
6870

6971

72+
@RetryErrors(exception=DeadlineExceeded)
7073
def test_restore_database(capsys):
7174
backup_sample.restore_database(INSTANCE_ID, RESTORE_DB_ID, BACKUP_ID)
7275
out, _ = capsys.readouterr()

0 commit comments

Comments
 (0)