From 61dbcc7de795de3cae8ac883ea2311c366fc5b52 Mon Sep 17 00:00:00 2001 From: Mark Keller Date: Thu, 16 Nov 2023 13:41:53 -0800 Subject: [PATCH] less flaky test_filelock_hang --- test/unit/test_cache.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/unit/test_cache.py b/test/unit/test_cache.py index d490e4c04..11d01f7c9 100644 --- a/test/unit/test_cache.py +++ b/test/unit/test_cache.py @@ -349,13 +349,11 @@ def test_filelock_hang(self, tmpdir, caplog): # changes, we set force_flush to True with c._lock: assert not c._save(force_flush=True) - assert caplog.record_tuples == [ - ( - "snowflake.connector.cache", - logging.DEBUG, - f"acquiring {c._file_lock_path} timed out, skipping saving...", - ), - ] + assert ( + "snowflake.connector.cache", + logging.DEBUG, + f"acquiring {c._file_lock_path} timed out, skipping saving...", + ) in caplog.record_tuples def test_pickle(self, tmpdir): c = AlwaysSaveSFDictFileCache(file_path=os.path.join(tmpdir, "cache.txt"))