Commit 6cd7ae9a authored by Łukasz Nowak's avatar Łukasz Nowak

software/rapid-cdn: Show full diffs in TestDataMixin

It's very important to have readable and contextable information on failures,
in order to track root cause of the problem.
parent 424d7a0d
...@@ -328,6 +328,9 @@ class AtsMixin(object): ...@@ -328,6 +328,9 @@ class AtsMixin(object):
class TestDataMixin(object): class TestDataMixin(object):
# show full diffs, as it is required for proper analysis of problems
maxDiff = None
def getTrimmedProcessInfo(self): def getTrimmedProcessInfo(self):
return '\n'.join(sorted([ return '\n'.join(sorted([
'%(group)s:%(name)s %(statename)s' % q for q '%(group)s:%(name)s %(statename)s' % q for q
...@@ -351,8 +354,6 @@ class TestDataMixin(object): ...@@ -351,8 +354,6 @@ class TestDataMixin(object):
value = data_replacement_dict[replacement] value = data_replacement_dict[replacement]
runtime_data = runtime_data.replace(value, replacement) runtime_data = runtime_data.replace(value, replacement)
maxDiff = self.maxDiff
self.maxDiff = None
longMessage = self.longMessage longMessage = self.longMessage
self.longMessage = True self.longMessage = True
try: try:
...@@ -367,7 +368,6 @@ class TestDataMixin(object): ...@@ -367,7 +368,6 @@ class TestDataMixin(object):
fh.write(runtime_data.strip() + '\n') fh.write(runtime_data.strip() + '\n')
raise raise
finally: finally:
self.maxDiff = maxDiff
self.longMessage = longMessage self.longMessage = longMessage
def _test_file_list(self, slave_dir_list, IGNORE_PATH_LIST=None): def _test_file_list(self, slave_dir_list, IGNORE_PATH_LIST=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment