Merge lp:~stevenk/launchpad/test-thread-debug into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Merged at revision: 11713
Proposed branch: lp:~stevenk/launchpad/test-thread-debug
Merge into: lp:launchpad
Diff against target: 27 lines (+2/-2)
1 file modified
lib/lp/codehosting/puller/tests/test_worker.py (+2/-2)
To merge this branch: bzr merge lp:~stevenk/launchpad/test-thread-debug
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+38510@code.launchpad.net

Description of the change

This branch has test_worker for the branch puller use FixedHttpServer, rather than HttpServer, which looks to solve the threading issue.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/codehosting/puller/tests/test_worker.py'
--- lib/lp/codehosting/puller/tests/test_worker.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/puller/tests/test_worker.py 2010-10-15 08:51:53 +0000
@@ -31,13 +31,13 @@
31 TestCaseInTempDir,31 TestCaseInTempDir,
32 TestCaseWithTransport,32 TestCaseWithTransport,
33 )33 )
34from bzrlib.tests.http_server import HttpServer
35from bzrlib.transport import get_transport34from bzrlib.transport import get_transport
3635
37from lp.code.enums import BranchType36from lp.code.enums import BranchType
38from lp.codehosting.puller.tests import (37from lp.codehosting.puller.tests import (
39 AcceptAnythingPolicy,38 AcceptAnythingPolicy,
40 BlacklistPolicy,39 BlacklistPolicy,
40 FixedHttpServer,
41 PullerWorkerMixin,41 PullerWorkerMixin,
42 WhitelistPolicy,42 WhitelistPolicy,
43 )43 )
@@ -698,7 +698,7 @@
698698
699 def getHttpServerForCwd(self):699 def getHttpServerForCwd(self):
700 """Get an `HttpServer` instance that serves from '.'."""700 """Get an `HttpServer` instance that serves from '.'."""
701 server = HttpServer()701 server = FixedHttpServer()
702 server.start_server()702 server.start_server()
703 self.addCleanup(server.stop_server)703 self.addCleanup(server.stop_server)
704 # The gc.collect allows the threads behind any HTTP requests to exit.704 # The gc.collect allows the threads behind any HTTP requests to exit.