Comment 3 for bug 587886

Revision history for this message
Māris Fogels (mars) wrote :

Here is the most likely culprit: a Traceback begin generated by the test framework itself. That error kills the child testrunner:

test: xx-copy-packages_txt
failure: xx-copy-packages_txt [ multipart
Content-Type: text/x-traceback;charset=utf8,language=python
traceback
Traceback (most recent call last):
  File "/var/launchpad/test/bin/test", line 258, in <module>
    result = testrunner.run([])
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/__init__.py", line 32, in run
    failed = run_internal(defaults, args, script_parts=script_parts)
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/__init__.py", line 45, in run_internal
    runner.run()
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/runner.py", line 138, in run
    self.run_tests()
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/runner.py", line 219, in run_tests
    setup_layers, self.failures, self.errors)
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/runner.py", line 377, in run_layer
    return run_tests(options, tests, layer_name, failures, errors)
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/runner.py", line 309, in run_tests
    test(result)
  File "/usr/lib/python2.5/unittest.py", line 281, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.5/unittest.py", line 263, in run
    result.addFailure(self, self._exc_info())
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/runner.py", line 719, in addFailure
    exc_info)
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/formatter.py", line 943, in test_failure
    self._subunit.addFailure(test, details=details)
  File "/usr/lib/python2.5/site-packages/subunit/__init__.py", line 599, in addFailure
    self._addOutcome("failure", test, error=error, details=details)
  File "/usr/lib/python2.5/site-packages/subunit/__init__.py", line 624, in _addOutcome
    self._write_details(details)
  File "/usr/lib/python2.5/site-packages/subunit/__init__.py", line 700, in _write_details
    map(encoder.write, content.iter_bytes())
  File "/var/launchpad/tmp/eggs/testtools-0.9.2-py2.5.egg/testtools/content.py", line 38, in iter_bytes
    return self._get_bytes()
  File "/var/launchpad/tmp/eggs/zope.testing-3.9.4_p0-py2.5.egg/zope/testing/testrunner/formatter.py", line 919, in <lambda>
    self.TRACEBACK_CONTENT_TYPE, lambda: [traceback.encode('utf8')])}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 10895: ordinal not in range(128)
test: Could not communicate with subprocess
tags: zope:error_with_banner
successful: Could not communicate with subprocess
test: Running in a subprocess.
tags: zope:info_suboptimal
successful: Running in a subprocess.

I can think of two important questions that still need to be answered:

  1) Why are these intermittent test failures taking place?

  2) Why is the parent testrunner process not failing the suite when it knows that the child process died due to a testrunner error? (I.e. the parent it got a 'Could not communicate with subprocess' flag)