8000 Fix test randomness [(#1043)](https://github.com/GoogleCloudPlatform/… · plamut/python-bigquery@a6e89e1 · GitHub
[go: up one dir, main page]

Skip to content 65F6

Commit a6e89e1

Browse files
PicardParisJon Wayne Parrott
authored andcommitted
1 parent d50ad1d commit a6e89e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/snippets/async_query_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616

1717

1818
def test_async_query(capsys):
19+
# Query only outputs the first 10 rows, sort results to avoid randomness
1920
query = (
2021
'SELECT corpus FROM `publicdata.samples.shakespeare` '
21-
'GROUP BY corpus;')
22+
'GROUP BY corpus ORDER BY corpus')
2223

2324
async_query(query)
2425

2526
out, _ = capsys.readouterr()
2627

27-
assert 'romeoandjuliet' in out
28+
assert 'antonyandcleopatra' in out

0 commit comments

Comments
 (0)
0