Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ylobankov committed Mar 21, 2023
1 parent 5e11b25 commit dc24973
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/worker.py
Expand Up @@ -375,10 +375,10 @@ def run_loop(self, task_queue, result_queue):

if fails_count > 0 and short_status == 'pass':
result_queue.put(self.wrap_result(task_id, 'flaky', duration))
else:
result_queue.put(
self.wrap_result(task_id, short_status, duration)
)

result_queue.put(
self.wrap_result(task_id, short_status, duration)
)

if short_status == 'fail':
if Options().args.is_force:
Expand Down
15 changes: 11 additions & 4 deletions listeners.py
Expand Up @@ -50,9 +50,10 @@ def process_result(self, obj):
if obj.is_long:
self.long_tasks.add(obj.task_id)

if obj.short_status not in self.stats:
self.stats[obj.short_status] = 0
self.stats[obj.short_status] += 1
if obj.short_status != 'flaky':
if obj.short_status not in self.stats:
self.stats[obj.short_status] = 0
self.stats[obj.short_status] += 1

if obj.short_status == 'fail':
self.failed_tasks.append((obj.task_id,
Expand Down Expand Up @@ -180,7 +181,13 @@ def print_statistics(self):
if self.stats:
final_report('Statistics:\n', schema='test_var')
for short_status, cnt in self.stats.items():
final_report('* %s: %d\n' % (short_status, cnt), schema='test_var')
if short_status == 'pass' and self.flaked_tasks:
final_report('* %s: %d (flaky: %d)\n' %
(short_status, cnt, len(self.flaked_tasks)),
schema='test_var')
else:
final_report('* %s: %d\n' % (short_status, cnt),
schema='test_var')

if self.flaked_tasks:
final_report('Flaked tasks:\n', schema='test_var')
Expand Down

0 comments on commit dc24973

Please sign in to comment.