Skip to content

Commit

Permalink
Deflake bigtable and spanner tests. [(#2224)](GoogleCloudPlatform/pyt…
Browse files Browse the repository at this point in the history
…hon-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.
  • Loading branch information
theacodes committed Jun 14, 2019
1 parent 99bf094 commit f8a828b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion samples/samples/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ def test_query_with_struct(capsys):
def test_query_with_array_of_struct(capsys):
snippets.query_with_array_of_struct(INSTANCE_ID, DATABASE_ID)
out, _ = capsys.readouterr()
assert 'SingerId: 8\nSingerId: 7\nSingerId: 6' in out
assert 'SingerId: 8' in out
assert 'SingerId: 7' in out
assert 'SingerId: 6' in out


def test_query_struct_field(capsys):
Expand Down

0 comments on commit f8a828b

Please sign in to comment.