diff options
author | Rupali Jagtap <rupalijagtap@google.com> | 2023-08-16 12:07:12 -0700 |
---|---|---|
committer | Rupali Jagtap <rupalijagtap@google.com> | 2023-08-16 12:07:12 -0700 |
commit | e6bc890624ba52e62b0fdebe80aca521bc39c2f8 (patch) | |
tree | 1cf92593138b733900f98916b1e340e67bc5b498 | |
parent | b4adc60dd05fb439c36b1522b8ec56ea02b8c33c (diff) | |
download | adt-infra-e6bc890624ba52e62b0fdebe80aca521bc39c2f8.tar.gz |
Add retries to tests and skip consistently failing tests
BUG: b/291324083, b/294604911, b/292590111
Change-Id: I90a81b898e509f7c2cf619834996654874263bd1
4 files changed, 7 insertions, 0 deletions
diff --git a/pytest/test_embedded/tests/console/test_sleep_awake.py b/pytest/test_embedded/tests/console/test_sleep_awake.py index c80d4520..c6c69304 100644 --- a/pytest/test_embedded/tests/console/test_sleep_awake.py +++ b/pytest/test_embedded/tests/console/test_sleep_awake.py @@ -112,6 +112,7 @@ def test_wake_up_wakes_the_device(adb_shell, emulator_off): @pytest.mark.adb @pytest.mark.timeout(timeout=60, func_only=True) @pytest.mark.flaky(reruns=3, reruns_delay=5) +@pytest.mark.skip(reason="b/292590111") def test_power_down_turns_off_the_screen(emulator_off, get_screenshot): """Test case to verify that a powered-down device has a black screen. diff --git a/pytest/test_embedded/tests/graphics/test_chrome.py b/pytest/test_embedded/tests/graphics/test_chrome.py index e528e073..7704d3be 100644 --- a/pytest/test_embedded/tests/graphics/test_chrome.py +++ b/pytest/test_embedded/tests/graphics/test_chrome.py @@ -125,6 +125,7 @@ def prepare_chrome(avd): avd.stop_activity("com.android.chrome") @pytest.mark.flaky(reruns=3, reruns_delay=5) +@pytest.mark.skipif(sys.platform == "win32", reason="b/291324083") def test_make_sure_webserver_works(test_server): """Test function to ensure that the web server is functioning correctly. diff --git a/pytest/test_embedded/tests/recording/test_recording.py b/pytest/test_embedded/tests/recording/test_recording.py index 24cc003f..afd24bcd 100644 --- a/pytest/test_embedded/tests/recording/test_recording.py +++ b/pytest/test_embedded/tests/recording/test_recording.py @@ -34,6 +34,7 @@ def screen_service(service): @pytest.mark.timeout(timeout=20, func_only=True) +@pytest.mark.flaky(reruns=3, reruns_delay=5) def test_screen_record_sends_event(screen_service, tmp_path): stream = screen_service.ReceiveRecordingEvents(empty_pb2.Empty()) info = RecordingInfo(width=120, height=120, file_name=str(tmp_path / "sample.webm")) @@ -51,6 +52,7 @@ def test_screen_record_sends_event(screen_service, tmp_path): @pytest.mark.timeout(timeout=20, func_only=True) +@pytest.mark.flaky(reruns=3, reruns_delay=5) def test_screen_records_video(screen_service, animation_app, tmp_path): sample_webm = tmp_path / "sample.webm" info = RecordingInfo(width=120, height=120, file_name=str(sample_webm)) @@ -65,6 +67,7 @@ def test_screen_records_video(screen_service, animation_app, tmp_path): @pytest.mark.timeout(timeout=20, func_only=True) +@pytest.mark.flaky(reruns=3, reruns_delay=5) def test_can_only_record_once(screen_service, tmp_path): sample_webm = tmp_path / "sample.webm" info = RecordingInfo(width=120, height=120, file_name=str(sample_webm)) @@ -77,6 +80,7 @@ def test_can_only_record_once(screen_service, tmp_path): @pytest.mark.timeout(timeout=20, func_only=True) +@pytest.mark.flaky(reruns=3, reruns_delay=5) def test_screen_records_video_in_webm(screen_service, animation_app, tmp_path): sample_webm = tmp_path / "sample.webm" info = RecordingInfo(width=120, height=120, file_name=str(sample_webm)) diff --git a/pytest/test_embedded/tests/snapshot/test_snapshot_downloads.py b/pytest/test_embedded/tests/snapshot/test_snapshot_downloads.py index cd872029..911df643 100644 --- a/pytest/test_embedded/tests/snapshot/test_snapshot_downloads.py +++ b/pytest/test_embedded/tests/snapshot/test_snapshot_downloads.py @@ -125,6 +125,7 @@ def check_boot_from_snapshot(avdpath) -> bool: @pytest.mark.e2e @pytest.mark.nongfxstream +@pytest.mark.flaky(reruns=3, reruns_delay=5) @pytest.mark.skipif(sys.platform == "win32", reason="b/280653636") def test_can_load_oldsnapshot(emulator): """test that current emulator can load the snapshot created by old emulator |