Skip to content

Commit bd5d71f

Browse files
Disable verbose serialization of box.error in diff tests
In scope of tarantool/tarantool#9105, we are going to increase the verbosity of `box.error` serialization. Since the verbose error representation contains the diagnostic trace, it is unsuitable for diff tests, so let's disable it from the CLI. Needed for tarantool/tarantool#9105
1 parent bebdb58 commit bd5d71f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/server.py

+7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class Server(object):
3535
assert(box.error.injection.set('ERRINJ_AUTO_UPGRADE', true) == 'ok', \
3636
'no such errinj')"
3737

38+
# Since the verbose box.error representation contains the diagnostic trace,
39+
# it is unsuitable for diff tests, and we disable it from the CLI.
40+
DISABLE_BOX_ERROR_SERIALIZE_VERBOSE = \
41+
"_, tweaks = pcall(require, 'internal.tweaks') " \
42+
"if tweaks ~= nil and tweaks.box_error_serialize_verbose ~= nil then " \
43+
"tweaks.box_error_serialize_verbose = false end"
44+
3845
@property
3946
def vardir(self):
4047
if not hasattr(self, '_vardir'):

lib/tarantool_server.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,12 @@ def copy_files(self):
839839
shutil.copy(self.snapshot_path, snapshot_dest)
840840

841841
def prepare_args(self, args=[]):
842-
cli_args = [self.ctl_path, 'start',
842+
cli_args = [self.binary, '-e', self.DISABLE_BOX_ERROR_SERIALIZE_VERBOSE,
843+
self.ctl_path, 'start',
843844
os.path.basename(self.script)] + args
844845
if self.disable_schema_upgrade:
845-
cli_args = [self.binary, '-e',
846-
self.DISABLE_AUTO_UPGRADE] + cli_args
846+
cli_args = cli_args[0] + ['-e', self.DISABLE_AUTO_UPGRADE] + \
847+
cli_args[1:]
847848

848849
return cli_args
849850

0 commit comments

Comments
 (0)