diff --git a/test/e2e/warm_test.py b/test/e2e/warm_test.py index 434890ea..dbeec158 100644 --- a/test/e2e/warm_test.py +++ b/test/e2e/warm_test.py @@ -357,8 +357,12 @@ job.id""" self.assertEqual(ping, {**turn, "max_output_tokens": 16}) # The request rows carry the same prefix identity and cache marks as - # the turn they repeat, and never a transcript row of their own. - rows = self.rows(parent) + # the turn they repeat, and never a transcript row of their own. A + # ping's row is written after its stream ends, so the provider can see + # the second ping before the daemon records it. + rows = wait_for( + lambda: self.rows(parent) if len(self.rows(parent)) == 3 else None + ) self.assertEqual( [row["kind"] for row in rows], ["turn", "background", "background"] )