Skip to content

Commit

Permalink
Disable verbose serialization of box.error in diff tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
CuriousGeorgiy committed Feb 22, 2024
1 parent 61bc6ea commit 5b683cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions lib/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ class Server(object):
assert(box.error.injection.set('ERRINJ_AUTO_UPGRADE', true) == 'ok', \
'no such errinj')"

# Since the verbose box.error representation contains the diagnostic trace,
# it is unsuitable for diff tests, and we disable it from the CLI.
DISABLE_BOX_ERROR_SERIALIZE_VERBOSE = \
"_, tweaks = pcall(require, 'internal.tweaks') " \
"if tweaks ~= nil and tweaks.box_error_serialize_verbose ~= nil then " \
"tweaks.box_error_serialize_verbose = false end"

@property
def vardir(self):
if not hasattr(self, '_vardir'):
Expand Down
7 changes: 4 additions & 3 deletions lib/tarantool_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,12 @@ def copy_files(self):
shutil.copy(self.snapshot_path, snapshot_dest)

def prepare_args(self, args=[]):
cli_args = [self.ctl_path, 'start',
cli_args = [self.binary, '-e', self.DISABLE_BOX_ERROR_SERIALIZE_VERBOSE,
self.ctl_path, 'start',
os.path.basename(self.script)] + args
if self.disable_schema_upgrade:
cli_args = [self.binary, '-e',
self.DISABLE_AUTO_UPGRADE] + cli_args
cli_args = cli_args[0] + ['-e', self.DISABLE_AUTO_UPGRADE] + \
cli_args[1:]

return cli_args

Expand Down

0 comments on commit 5b683cb

Please sign in to comment.