diff --git a/priv/python/albedo_plugins/cua.py b/priv/python/albedo_plugins/cua.py index 6da4e9fc..34447f05 100644 --- a/priv/python/albedo_plugins/cua.py +++ b/priv/python/albedo_plugins/cua.py @@ -979,8 +979,7 @@ class _DriverClient: await asyncio.wait_for(process.wait(), timeout=1.0) if stderr_task is not None: stderr_task.cancel() - with contextlib.suppress(Exception): - await stderr_task + await asyncio.wait({stderr_task}) async def close(self) -> None: async with self._lock: diff --git a/test/e2e/cua_test.py b/test/e2e/cua_test.py index e7688c4d..e84e88b4 100644 --- a/test/e2e/cua_test.py +++ b/test/e2e/cua_test.py @@ -380,7 +380,12 @@ Path({str(marker)!r}).write_text("ok", encoding="utf-8") app.prompt(session, "drive calculator").close() app.idle(session) - self.assertTrue(marker.exists(), app.stream_page(session)) + if not marker.exists(): + history = app.history(session)["items"] + raise AssertionError( + "CUA cell did not write its completion marker: " + + json.dumps(history[-2:], default=str) + ) sent = json.dumps(provider.requests[-1]["request"]) encoded = re.findall(r"data:image/png;base64,([A-Za-z0-9+/=]+)", sent) self.assertEqual(len(encoded), 2)