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:33 UTC
(superset) 06/16: fix: Flaky test_explore_json_async test (#26059)
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 ea65c2467cee28d2e5a13ed1ec0cc65e71f11127
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Nov 22 09:11:09 2023 -0300
fix: Flaky test_explore_json_async test (#26059)
Co-authored-by: John Bodley <45...@users.noreply.github.com>
(cherry picked from commit 2b88225ee113062ad1c108e28a8b41a7a04a0a1a)
---
tests/integration_tests/core_tests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py
index 191d9dc2d0..193cc57031 100644
--- a/tests/integration_tests/core_tests.py
+++ b/tests/integration_tests/core_tests.py
@@ -839,7 +839,8 @@ class TestCore(SupersetTestCase, InsertChartMixin):
data = json.loads(rv.data.decode("utf-8"))
keys = list(data.keys())
- self.assertEqual(rv.status_code, 202)
+ # 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"]
)