Skip to content

Commit

Permalink
Made test_snapshot_timetable() deterministic (#1679)
Browse files Browse the repository at this point in the history
The previous version of the test case can't guarantee that it always
passes. The change would make it not depend on the undeterministic
nature of time table.
  • Loading branch information
jmao-denver authored Dec 13, 2021
1 parent 2ba8a6d commit 6e3f731
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyclient/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ def test_update(self):
self.assertEqual(len(column_specs) + 1, len(t2.schema))

def test_snapshot_timetable(self):
t = self.session.time_table(period=10000000)
time.sleep(1)
t = self.session.time_table(period=1000000000)
pa_table = t.snapshot()
self.assertGreaterEqual(pa_table.num_rows, 1)
self.assertIsNotNone(pa_table)

def test_create_data_table_then_update(self):
pa_table = csv.read_csv(self.csv_file)
Expand Down

0 comments on commit 6e3f731

Please sign in to comment.