Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add flaky decorator to long_callback tests to retry up to 3 times #1741

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requires-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ multiprocess>=0.70.12
redis>=3.5.3
psutil>=5.8.0
celery[redis]>=5.1.2
flaky>=3.7.0
8 changes: 8 additions & 0 deletions tests/integration/long_callback/test_basic_long_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytest
import shutil
import time
from flaky import flaky

from dash.testing.application_runners import import_app
import psutil
Expand Down Expand Up @@ -86,6 +87,7 @@ def setup_long_callback_app(manager_name, app_name):
os.environ.pop("DISKCACHE_DIR")


@flaky(max_runs=3)
def test_lcbc001_fast_input(dash_duo, manager):
"""
Make sure that we settle to the correct final value when handling rapid inputs
Expand All @@ -107,6 +109,7 @@ def test_lcbc001_fast_input(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc002_long_callback_running(dash_duo, manager):
with setup_long_callback_app(manager, "app2") as app:
dash_duo.start_server(app)
Expand Down Expand Up @@ -134,6 +137,7 @@ def test_lcbc002_long_callback_running(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc003_long_callback_running_cancel(dash_duo, manager):
lock = Lock()

Expand Down Expand Up @@ -174,6 +178,7 @@ def test_lcbc003_long_callback_running_cancel(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc004_long_callback_progress(dash_duo, manager):
with setup_long_callback_app(manager, "app4") as app:
dash_duo.start_server(app)
Expand Down Expand Up @@ -207,6 +212,7 @@ def test_lcbc004_long_callback_progress(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc005_long_callback_caching(dash_duo, manager):
lock = Lock()

Expand Down Expand Up @@ -274,6 +280,7 @@ def test_lcbc005_long_callback_caching(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc006_long_callback_caching_multi(dash_duo, manager):
lock = Lock()

Expand Down Expand Up @@ -383,6 +390,7 @@ def test_lcbc006_long_callback_caching_multi(dash_duo, manager):
assert dash_duo.get_logs() == []


@flaky(max_runs=3)
def test_lcbc007_validation_layout(dash_duo, manager):
with setup_long_callback_app(manager, "app7") as app:
dash_duo.start_server(app)
Expand Down