From 6c38d241c6fc6340fde6ae8f36d21bcff425d93e Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Wed, 10 Apr 2024 10:13:59 +0300
Subject: [PATCH] test: make the test_raft_log failure output more manageable
 by default

---
 test/int/test_basics.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/int/test_basics.py b/test/int/test_basics.py
index cc42113847..753972f34e 100644
--- a/test/int/test_basics.py
+++ b/test/int/test_basics.py
@@ -481,7 +481,14 @@ Insert({_pico_index}, [528,0,"routing_key",true,[["instance_id",null,null,null,n
         _pico_table=space_id("_pico_table"),
         _pico_index=space_id("_pico_index"),
     )
-    assert preprocess(raft_log) == preprocess(expected)
+    try:
+        assert preprocess(raft_log) == preprocess(expected)
+    except AssertionError as e:
+        # hide the huge string variables from the verbose pytest output enabled
+        # by the `--showlocals` option
+        del raft_log
+        del expected
+        raise e from e
 
 
 def test_governor_notices_restarts(instance: Instance):
-- 
GitLab