nsivarajan commented on code in PR #29912: URL: https://github.com/apache/superset/pull/29912#discussion_r1736614424
########## tests/unit_tests/async_events/async_query_manager_tests.py: ########## @@ -26,17 +27,27 @@ AsyncQueryManager, AsyncQueryTokenException, ) +from superset.async_events.cache_backend import ( + RedisCacheBackend, + RedisSentinelCacheBackend, +) JWT_TOKEN_SECRET = "some_secret" JWT_TOKEN_COOKIE_NAME = "superset_async_jwt" +# Define the cache backends once as mocks +cache_backends = { + "RedisCacheBackend": mock.Mock(spec=RedisCacheBackend), + "RedisSentinelCacheBackend": mock.Mock(spec=RedisSentinelCacheBackend), + "redis.Redis": mock.Mock(spec=redis.Redis), +} + Review Comment: Using `pytest.mark.parametrize` with `mock` from `unittest` caused compatibility issues. Switching to `parameterized.expand` resolved these issues and successfully covered the test cases, leading to a successful CI run. I’ll revisit this case later for further investigation. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org