Skip to content

Commit

Permalink
don't use lock for client API
Browse files Browse the repository at this point in the history
  • Loading branch information
marph91 committed Sep 7, 2024
1 parent e88556b commit 2712a64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 6 additions & 7 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ def setUp(self) -> None:

LOGGER.debug("Test: %s", self.id())

with self.api.sync_lock():
self.api.delete_all_notebooks()
self.api.delete_all_notes()
self.api.delete_all_resources()
self.api.delete_all_tags()
# Delete revisions last to cover all previous deletions.
self.api.delete_all_revisions()
self.api.delete_all_notebooks()
self.api.delete_all_notes()
self.api.delete_all_resources()
self.api.delete_all_tags()
# Delete revisions last to cover all previous deletions.
self.api.delete_all_revisions()

@staticmethod
def get_random_id() -> str:
Expand Down
3 changes: 2 additions & 1 deletion test/test_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def tearDownModule(): # pylint: disable=invalid-name
class ServerBase(common.Base):
def setUp(self):
self.api = cast(ServerApi, API)
super().setUp()
with self.api.sync_lock(): # needed for clearing all data
super().setUp()

self.api._acquire_sync_lock()
if self.api.current_sync_lock is None:
Expand Down

0 comments on commit 2712a64

Please sign in to comment.