summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Hu <bohu@google.com>2023-11-30 09:15:31 -0800
committerBo Hu <bohu@google.com>2023-11-30 09:15:31 -0800
commitb7da9d53d58bf0b6c56f4dac5e6b455de59a3fe4 (patch)
treef28c66537b73d2c2d3dd84bdc8d9ac7d369e2f98
parentda90b247cc8e87dc76c86624b8428a3a57c35625 (diff)
downloadadt-infra-b7da9d53d58bf0b6c56f4dac5e6b455de59a3fe4.tar.gz
recording: test the webm size more realistically
The recent regression produces a near 4k webm file that is not playable. This update the file size check to 10k, closer to the 40k realistic file size on linux, leaving some room for compression algorithm variations. Bug: 313666374 Change-Id: Id0224c50a328f3789c5e05fa096106b5c6ece7e8
-rw-r--r--pytest/test_embedded/tests/recording/test_recording.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pytest/test_embedded/tests/recording/test_recording.py b/pytest/test_embedded/tests/recording/test_recording.py
index ee03686c..c5b752cf 100644
--- a/pytest/test_embedded/tests/recording/test_recording.py
+++ b/pytest/test_embedded/tests/recording/test_recording.py
@@ -66,9 +66,12 @@ def test_screen_records_video(screen_service, animation_app, tmp_path):
time.sleep(2)
screen_service.StopRecording(info)
+ # bump the size to 10240, as empty webm will be around 4k already
+ # realistically, the size should be around 49621, but lets leave some
+ # room for that
assert sample_webm.exists()
assert (
- sample_webm.stat().st_size > 1024
+ sample_webm.stat().st_size > 10240
), "We should have recorded a series of frames"