Skip to content

Commit

Permalink
less flaky test_filelock_hang
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeller committed Nov 16, 2023
1 parent b7173d2 commit 61dbcc7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/unit/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 61dbcc7

Please sign in to comment.