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
=== modified file 'lib/canonical/testing/layers.py'
--- lib/canonical/testing/layers.py 2010-10-20 03:59:21 +0000
+++ lib/canonical/testing/layers.py 2010-10-21 10:56:19 +0000
@@ -349,6 +349,7 @@
349 gc.collect()349 gc.collect()
350 else:350 else:
351 break351 break
352 new_threads = new_live_threads()
352353
353 if new_threads:354 if new_threads:
354 # BaseLayer.disable_thread_check is a mechanism to stop355 # BaseLayer.disable_thread_check is a mechanism to stop
355356
=== modified file 'lib/canonical/testing/tests/test_layers.py'
--- lib/canonical/testing/tests/test_layers.py 2010-09-29 05:53:47 +0000
+++ lib/canonical/testing/tests/test_layers.py 2010-10-21 10:56:19 +0000
@@ -7,7 +7,6 @@
7__all__ = []7__all__ = []
88
9import threading9import threading
10import unittest
1110
12from canonical.testing.layers import (11from canonical.testing.layers import (
13 BaseLayer,12 BaseLayer,
@@ -42,7 +41,3 @@
42 def test_disabled_thread_check(self):41 def test_disabled_thread_check(self):
43 # Confirm the BaseLayer.disable_thread_check code path works.42 # Confirm the BaseLayer.disable_thread_check code path works.
44 BaseLayer.disable_thread_check = True43 BaseLayer.disable_thread_check = True
45
46
47def test_suite():
48 return unittest.TestLoader().loadTestsFromName(__name__)
4944
=== modified file 'versions.cfg'
--- versions.cfg 2010-10-18 15:11:17 +0000
+++ versions.cfg 2010-10-21 10:56:19 +0000
@@ -231,7 +231,9 @@
231zope.tales = 3.4.0231zope.tales = 3.4.0
232zope.testbrowser = 3.7.0a1232zope.testbrowser = 3.7.0a1
233# Build of lp:~mars/zope.testing/3.9.4-p1. Fixes bugs 570380 and 587886.233# Build of lp:~mars/zope.testing/3.9.4-p1. Fixes bugs 570380 and 587886.
234zope.testing = 3.9.4-p1234# With patch for thread leaks to make them skips, fixes windmill errors with
235# 'new threads' in hudson/ec2 builds.
236zope.testing = 3.9.4-p2
235zope.thread = 3.4237zope.thread = 3.4
236zope.traversing = 3.8.0238zope.traversing = 3.8.0
237zope.viewlet = 3.6.1239zope.viewlet = 3.6.1