Skip to content

Commit

Permalink
Make autosharding test more robust (#32293)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm committed Aug 25, 2024
1 parent b8bbf59 commit 9c0a950
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sdks/python/apache_beam/io/gcp/bigquery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2278,10 +2278,13 @@ def store_callback(table, **kwargs):
num_streaming_keys=500))

with open(file_name_1) as f1, open(file_name_2) as f2:
out1 = json.load(f1)
self.assertEqual(out1['colA_values'], ['value1', 'value3'])
out2 = json.load(f2)
self.assertEqual(out2['colA_values'], ['value5'])
out1 = json.load(f1)['colA_values']
out2 = json.load(f2)['colA_values']
out_all = out1 + out2
out_all.sort()
self.assertEqual(out_all, ['value1', 'value3', 'value5'])
self.assertEqual(len(out1), 2)
self.assertEqual(len(out2), 1)


@unittest.skipIf(HttpError is None, 'GCP dependencies are not installed')
Expand Down

0 comments on commit 9c0a950

Please sign in to comment.