Merge ~cjwatson/zope.testrunner:skip-thread-errors into ~launchpad-committers/zope.testrunner:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 91af4e8381cc26d99adeb6f225910dd860ab102d
Proposed branch: ~cjwatson/zope.testrunner:skip-thread-errors
Merge into: ~launchpad-committers/zope.testrunner:launchpad
Diff against target: 31 lines (+9/-1)
2 files modified
CHANGES.rst (+5/-0)
src/zope/testrunner/formatter.py (+4/-1)
Reviewer Review Type Date Requested Status
Tom Wardill (community) Approve
Review via email: mp+374532@code.launchpad.net

Commit message

Turn thread leaks into skips in subunit output

This still seems to occasionally happen in Launchpad test runs, and
doesn't need to be an error.

Based on work by Robert Collins in Launchpad's zope.testing fork.

Description of the change

To post a comment you must log in.
Revision history for this message
Tom Wardill (twom) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/CHANGES.rst b/CHANGES.rst
2index 53a1d38..05277f6 100644
3--- a/CHANGES.rst
4+++ b/CHANGES.rst
5@@ -2,6 +2,11 @@
6 zope.testrunner Changelog
7 ===========================
8
9+5.1+lp2
10+=======
11+
12+- Turn thread leaks into skips in subunit output.
13+
14 5.1+lp1 (2019-10-19)
15 ====================
16
17diff --git a/src/zope/testrunner/formatter.py b/src/zope/testrunner/formatter.py
18index 1791744..494e120 100644
19--- a/src/zope/testrunner/formatter.py
20+++ b/src/zope/testrunner/formatter.py
21@@ -1094,7 +1094,10 @@ class SubunitOutputFormatter(object):
22 """
23 self._subunit.startTest(test)
24 self._subunit.tags([self.TAG_THREADS], [])
25- self._subunit.addError(
26+ # This is a skip because it's normal for threads to not complete
27+ # exactly on test boundaries. We check for this in the LP
28+ # testrunner baselayer anyway.
29+ self._subunit.addSkip(
30 test, details={'threads': text_content(unicode(new_threads))})
31 self._subunit.stopTest(test)
32

Subscribers

People subscribed via source and target branches