Skip to content

Commit b0ce3bf

Browse files
committed
[FIX] tests/test_util: mute logger in tests
To avoid noise in CI runs. closes #78 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 68d1869 commit b0ce3bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/base/tests/test_util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,10 @@ def test_parallel_execute_retry_on_serialization_failure(self):
579579

580580
threading.current_thread().testing = False
581581
# exploded queries will generate a SerializationFailed error, causing some of the queries to be retried
582-
util.explode_execute(
583-
cr, util.format_query(cr, "DELETE FROM {}", TEST_TABLE_NAME), TEST_TABLE_NAME, bucket_size=1
584-
)
582+
with mute_logger(util.pg._logger.name, "odoo.sql_db"):
583+
util.explode_execute(
584+
cr, util.format_query(cr, "DELETE FROM {}", TEST_TABLE_NAME), TEST_TABLE_NAME, bucket_size=1
585+
)
585586
threading.current_thread().testing = True
586587

587588
if hasattr(self, "_savepoint_id"):

0 commit comments

Comments
 (0)