Skip to content

Commit

Permalink
CI Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cianyleow committed Jun 29, 2023
1 parent d1b9d65 commit bd53834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion changelog/64567.fixed.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fix flaky test for LazyLoader with isolated mocking of threading.RLock
Fix flaky test for LazyLoader with isolated mocking of threading.RLock
4 changes: 3 additions & 1 deletion tests/unit/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,9 @@ def test_lazyloader_refresh_file_mapping_called_with_lock_at___init__(self):
lock_mock = MagicMock()
lock_mock.__enter__ = MagicMock()
self.LOADER_CLASS._refresh_file_mapping = func_mock
with patch.object(self.LOADER_CLASS, "_get_lock", MagicMock(return_value=lock_mock)):
with patch.object(
self.LOADER_CLASS, "_get_lock", MagicMock(return_value=lock_mock)
):
loader = self.__init_loader()
lock_mock.__enter__.assert_called()
func_mock.assert_called()
Expand Down

0 comments on commit bd53834

Please sign in to comment.