From 727721d7a2854e703027e49ba7e80b4bf6b2ae20 Mon Sep 17 00:00:00 2001 From: "Moises Lopez - https://www.vauxoo.com/" Date: Sun, 7 Apr 2024 19:30:57 -0600 Subject: [PATCH] [IMP] account_move_name_sequence: pre-commit auto fixes --- .../tests/test_sequence_concurrency.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/account_move_name_sequence/tests/test_sequence_concurrency.py b/account_move_name_sequence/tests/test_sequence_concurrency.py index 7f7c7cc45..4dcd56fe7 100644 --- a/account_move_name_sequence/tests/test_sequence_concurrency.py +++ b/account_move_name_sequence/tests/test_sequence_concurrency.py @@ -23,11 +23,12 @@ class ThreadRaiseJoin(threading.Thread): self.exc = e def join(self, *args, **kwargs): - super().join(*args, **kwargs) + res = super().join(*args, **kwargs) # raise exception in the join # to raise it in the main thread if self.exc: raise self.exc + return res @tagged("post_install", "-at_install", "test_move_sequence") @@ -99,9 +100,7 @@ class TestSequenceConcurrency(TransactionCase): env = api.Environment(cr, SUPERUSER_ID, {}) cr_pid = cr.connection.get_backend_pid() # Avoid waiting for a long time and it needs to be less than deadlock - cr.execute( - "SET LOCAL statement_timeout = '%ss'", (deadlock_timeout + 10,) - ) + cr.execute("SET LOCAL statement_timeout = '%ss'", (deadlock_timeout + 10,)) if payment_first: _logger.info("Creating payment cr %s", cr_pid) self._create_payment_form(