File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1515import time
1616import uuid
1717
18+ from google .api_core import exceptions
1819from google .cloud import spanner
1920from google .cloud .spanner_v1 .instance import Backup
2021from google .cloud .spanner_v1 .instance import Instance
2122import pytest
23+ from test_utils .retry import RetryErrors
2224
2325import snippets
2426
@@ -84,7 +86,10 @@ def test_create_instance(spanner_instance):
8486
8587def test_create_instance_with_processing_units (capsys ):
8688 processing_units = 500
87- snippets .create_instance_with_processing_units (LCI_INSTANCE_ID , processing_units )
89+ retry_429 = RetryErrors (exceptions .ResourceExhausted , delay = 15 )
90+ retry_429 (snippets .create_instance_with_processing_units )(
91+ LCI_INSTANCE_ID , processing_units ,
92+ )
8893 out , _ = capsys .readouterr ()
8994 assert LCI_INSTANCE_ID in out
9095 assert "{} processing units" .format (processing_units ) in out
You can’t perform that action at this time.
0 commit comments