You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/12/04 17:09:36 UTC
(superset) 09/16: fix: flaky test_explore_json_async test v2 (#26106)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a3212ccba875cf25653f74a1143f6bb0e999b90c
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Tue Nov 28 05:21:13 2023 -0800
fix: flaky test_explore_json_async test v2 (#26106)
(cherry picked from commit 91a8b69d365789833b6b9698df3b3ae95b34629e)
---
tests/integration_tests/core_tests.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py
index 193cc57031..455dfe6305 100644
--- a/tests/integration_tests/core_tests.py
+++ b/tests/integration_tests/core_tests.py
@@ -840,10 +840,16 @@ class TestCore(SupersetTestCase, InsertChartMixin):
keys = list(data.keys())
# If chart is cached, it will return 200, otherwise 202
- self.assertTrue(rv.status_code in {200, 202})
- self.assertCountEqual(
- keys, ["channel_id", "job_id", "user_id", "status", "errors", "result_url"]
- )
+ assert rv.status_code in {200, 202}
+ if rv.status_code == 202:
+ assert keys == [
+ "channel_id",
+ "job_id",
+ "user_id",
+ "status",
+ "errors",
+ "result_url",
+ ]
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
@mock.patch.dict(