Skip to content

Commit

Permalink
test(spanner): fix flaky restore backup sample test
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee committed Sep 11, 2020
1 parent 1c9244b commit 268c4c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spanner/cloud-client/backup_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.
import uuid

from google.api_core.exceptions import DeadlineExceeded
from test_utils.retry import RetryErrors
from google.cloud import spanner
import pytest

Expand Down Expand Up @@ -67,6 +69,7 @@ def test_create_backup(capsys, database):
assert BACKUP_ID in out


@RetryErrors(exception=DeadlineExceeded)
def test_restore_database(capsys):
backup_sample.restore_database(INSTANCE_ID, RESTORE_DB_ID, BACKUP_ID)
out, _ = capsys.readouterr()
Expand Down

0 comments on commit 268c4c2

Please sign in to comment.