[test/ux] add a warning when test from FirefoxHelper timeout

authorLaurent Peuch <cortex@worlddomination.be>
changeset6a3634515bd5
branchdefault
phasepublic
hiddenno
parent revision#fce106b9977d [test/fix] tempfile is non portable linux command and is useless here
child revision#e830ace445bf [test] ensure FirefoxHelper successfully exited
files modified by this revision
cubicweb/devtools/qunit.py
# HG changeset patch
# User Laurent Peuch <cortex@worlddomination.be>
# Date 1576601649 -3600
# Tue Dec 17 17:54:09 2019 +0100
# Node ID 6a3634515bd57027ae8938b4a44c3e13d9dfa532
# Parent fce106b9977dc4797d4eeedb2fff7231d6684abd
[test/ux] add a warning when test from FirefoxHelper timeout

diff --git a/cubicweb/devtools/qunit.py b/cubicweb/devtools/qunit.py
@@ -175,11 +175,14 @@
1                      if result:
2                          yield test_name, lambda *args: 1, ()
3                      else:
4                          yield test_name, self.fail, (msg, )
5                  except Empty:
6 +                    # Empty means nothing was appended to test_queue within timeout
7                      error = True
8 +                    print("WARNING: timeout while trying to get the next test result from "
9 +                          "FirefoxHelper queue, see log file '%s' for more info" % browser.log_file)
10                      yield test_file, timeout_failure, (test_file, timeout, test_count)
11 
12          if test_count <= 0 and not error:
13              yield test_name, runtime_error, ('No test yielded by qunit for %s' % test_file, )
14