From 625f0f77bb6ee33add4022b74cba67d0cff4d352 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 Feb 2021 09:43:57 +0530 Subject: [PATCH] Ensure disk cache is cleared --- kitty_tests/graphics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index 335706c06..8aa3970a4 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -267,6 +267,10 @@ class TestGraphics(BaseTest): check_data() dc.clear() + st = time.monotonic() + while dc.size_on_disk() and time.monotonic() - st < 20: + time.sleep(0.01) + self.assertEqual(dc.size_on_disk(), 0) for frame in range(32): add(f'1:{frame}', f'{frame:02d}' * 8) dc.wait_for_write()