Commit 7dc8d4db authored by Julien Muchembled's avatar Julien Muchembled

qa: always start a new threaded test with a empty log file

This is important when using --loop, otherwise tearDown is slower and slower
at removing packets from the log.
parent aac495e4
......@@ -888,9 +888,15 @@ class NEOCluster(object):
class NEOThreadedTest(NeoTestBase):
__run_count = {}
def setupLog(self):
log_file = os.path.join(getTempDirectory(), self.id() + '.log')
logging.setup(log_file)
test_id = self.id()
i = self.__run_count.get(test_id, 0)
self.__run_count[test_id] = 1 + i
if i:
test_id += '-%s' % i
logging.setup(os.path.join(getTempDirectory(), test_id + '.log'))
return LoggerThreadName()
def _tearDown(self, success):
......
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