Skip to content

Commit

Permalink
fix(py-test): Wait for Full Cycle Before Checking if SubTable Failed (#…
Browse files Browse the repository at this point in the history
…6167)

This fixes the spurious CI failure from yesterday, which was caused by
checking if a table failed before there was the guarantee that the PUG
executed the update listener.

```
2024-10-02T06:26:34.9836763Z ======================================================================
2024-10-02T06:26:34.9837211Z FAIL [3.008s]: test_snapshot_when_with_history (tests.test_table.TableTestCase)
2024-10-02T06:26:34.9837607Z ----------------------------------------------------------------------
2024-10-02T06:26:34.9837829Z Traceback (most recent call last):
2024-10-02T06:26:34.9838342Z   File "/python/tests/test_table.py", line 570, in test_snapshot_when_with_history
2024-10-02T06:26:34.9838653Z     self.assertTrue(snapshot_hist.j_table.isFailed())
2024-10-02T06:26:34.9838883Z AssertionError: False is not true
```
  • Loading branch information
nbauernfeind authored Oct 3, 2024
1 parent 15ff4f5 commit e4c1ddc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/server/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,10 @@ def test_snapshot_when_with_history(self):
snapshot_hist = self.test_table.snapshot_when(t, history=True)
self.assertFalse(snapshot_hist.j_table.isFailed())
self.wait_ticking_table_update(t, row_count=10, timeout=2)
self.assertTrue(snapshot_hist.j_table.isFailed())
# we have not waited for a whole cycle yet, wait for the shared lock to guarantee cycle is over
# to ensure snapshot_hist has had the opportunity to process the update we just saw
with update_graph.shared_lock(t):
self.assertTrue(snapshot_hist.j_table.isFailed())

def test_agg_all_by(self):
test_table = empty_table(10)
Expand Down

0 comments on commit e4c1ddc

Please sign in to comment.