Merge lp:~lifeless/launchpad/threads into lp:launchpad

Proposed by Robert Collins
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: 11775
Proposed branch: lp:~lifeless/launchpad/threads
Merge into: lp:launchpad
Diff against target: 46 lines (+4/-6)
3 files modified
lib/canonical/testing/layers.py (+1/-0)
lib/canonical/testing/tests/test_layers.py (+0/-5)
versions.cfg (+3/-1)
To merge this branch: bzr merge lp:~lifeless/launchpad/threads
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+39009@code.launchpad.net

Description of the change

Stage two - we have hudson and ec2 that depend on subunit;

We can eventually filter the subunit stream but there isn't (yet) a tag based filter there, this will get us by in the interim. The zope change is:

diff -rup zope.testing-3.9.4-p1/src/zope/testing/testrunner/formatter.py zope.testing-3.9.4-p2/src/zope/testing/testrunner/formatter.py
--- zope.testing-3.9.4-p1/src/zope/testing/testrunner/formatter.py 2010-06-09 23:32:25.000000000 +1000
+++ zope.testing-3.9.4-p2/src/zope/testing/testrunner/formatter.py 2010-10-21 13:13:20.400452654 +1100
@@ -1048,8 +1048,11 @@ class SubunitOutputFormatter(object):
         """
         self._subunit.startTest(test)
         self._emit_tag(self.TAG_THREADS)
- self._subunit.addError(
- test, details=self._get_text_details('garbage', unicode(new_threads)))
+ # This is a skip because otherwise windmill errors make things break
+ # and its normal for threads to not complete exactly on test
+ # boundaries. We check for this in the LP testrunner baselayer anyway.
+ self._subunit.addSkip(
+ test, details=self._get_text_details('threads', unicode(new_threads)))

     def refcounts(self, rc, prev):
         """Report a change in reference counts."""

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

woo

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/testing/layers.py'
2--- lib/canonical/testing/layers.py 2010-10-20 03:59:21 +0000
3+++ lib/canonical/testing/layers.py 2010-10-21 10:56:19 +0000
4@@ -349,6 +349,7 @@
5 gc.collect()
6 else:
7 break
8+ new_threads = new_live_threads()
9
10 if new_threads:
11 # BaseLayer.disable_thread_check is a mechanism to stop
12
13=== modified file 'lib/canonical/testing/tests/test_layers.py'
14--- lib/canonical/testing/tests/test_layers.py 2010-09-29 05:53:47 +0000
15+++ lib/canonical/testing/tests/test_layers.py 2010-10-21 10:56:19 +0000
16@@ -7,7 +7,6 @@
17 __all__ = []
18
19 import threading
20-import unittest
21
22 from canonical.testing.layers import (
23 BaseLayer,
24@@ -42,7 +41,3 @@
25 def test_disabled_thread_check(self):
26 # Confirm the BaseLayer.disable_thread_check code path works.
27 BaseLayer.disable_thread_check = True
28-
29-
30-def test_suite():
31- return unittest.TestLoader().loadTestsFromName(__name__)
32
33=== modified file 'versions.cfg'
34--- versions.cfg 2010-10-18 15:11:17 +0000
35+++ versions.cfg 2010-10-21 10:56:19 +0000
36@@ -231,7 +231,9 @@
37 zope.tales = 3.4.0
38 zope.testbrowser = 3.7.0a1
39 # Build of lp:~mars/zope.testing/3.9.4-p1. Fixes bugs 570380 and 587886.
40-zope.testing = 3.9.4-p1
41+# With patch for thread leaks to make them skips, fixes windmill errors with
42+# 'new threads' in hudson/ec2 builds.
43+zope.testing = 3.9.4-p2
44 zope.thread = 3.4
45 zope.traversing = 3.8.0
46 zope.viewlet = 3.6.1