villebro commented on code in PR #21441:
URL: https://github.com/apache/superset/pull/21441#discussion_r968923587
##########
tests/integration_tests/charts/data/api_tests.py:
##########
@@ -210,6 +210,66 @@ def
test_with_row_limit_as_samples__rowcount_as_row_limit(self):
self.assert_row_count(rv, expected_row_count)
assert "GROUP BY" not in rv.json["result"][0]["query"]
+ @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
+ @mock.patch(
+ "superset.common.query_context_processor.config",
+ {
+ **app.config,
+ "CACHE_DEFAULT_TIMEOUT": 1234,
+ "DATA_CACHE_CONFIG": {
+ **app.config["DATA_CACHE_CONFIG"],
+ "CACHE_DEFAULT_TIMEOUT": None,
+ },
+ },
+ )
+ def test_cache_default_timeout(self):
+ query_context = get_query_context("birth_names", force=True)
+ rv = self.post_assert_metric(
+ CHART_DATA_URI,
+ query_context,
+ "data",
+ )
+ data = json.loads(rv.data.decode("utf-8"))
+ assert data["result"][0]["cache_timeout"] == 1234
Review Comment:
Interesting, it appears there's a side-effect that's causing this test to
fail when running the whole suite but passes when running only this test file.
I'll investigate what's causing it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]