Skip to content

Commit f8a828b

Browse files
authored
Deflake bigtable and spanner tests. [(#2224)](GoogleCloudPlatform/python-docs-samples#2224)
* Spanner doesn't actually promise the order of the results, so make the assertion work regardless of ordering. * Bigtable might need some more time to scale, so retry the assertion up to 10 times.
1 parent 99bf094 commit f8a828b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/samples/snippets_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def test_query_with_struct(capsys):
202202
def test_query_with_array_of_struct(capsys):
203203
snippets.query_with_array_of_struct(INSTANCE_ID, DATABASE_ID)
204204
out, _ = capsys.readouterr()
205-
assert 'SingerId: 8\nSingerId: 7\nSingerId: 6' in out
205+
assert 'SingerId: 8' in out
206+
assert 'SingerId: 7' in out
207+
assert 'SingerId: 6' in out
206208

207209

208210
def test_query_struct_field(capsys):

0 commit comments

Comments
 (0)