> review needs-info
>
> I don't want to merge this as-is, but I have a guess about what's going on...
> Perhaps it's an IPv6 vs. IPv4 issue?
Exactly (and thanks to fullermd for confirming :-)
> Does the test work if you change it to pass "--port=127.0.0.1:0"?
Perfectly.
> The test
> assumes 127.0.0.1 later, so it's reasonable to explicitly pass it here.
Done.
> This change isn't controversial at all :)
Not in this incarnation :-)
It was discussed with Robert *before* submission and modified *during* submission,
so it ends up trivial instead of controversial :)
The whole patch is now:
=== modified file 'bzrlib/tests/blackbox/test_serve.py'
--- bzrlib/tests/blackbox/test_serve.py 2009-08-27 22:17:35 +0000
+++ bzrlib/tests/blackbox/test_serve.py 2009-09-08 03:31:02 +0000
@@ -255,14 +255,15 @@
t = self.get_transport() t.mkdir('server-root') self.run_bzr_serve_then_func(
- ['--port', '0', '--directory', t.local_abspath('server-root'),
+ ['--port', '127.0.0.1:0',
+ '--directory', t.local_abspath('server-root'), '--allow-writes'], self.when_server_started)
# The when_server_started method issued a find_repositoryV3 that should
# fail with 'norepository' because there are no repositories inside the
# --directory. self.assertEqual(('norepository',), self.client_resp)
-
+
def run_bzr_serve_then_func(self, serve_args, func, *func_args, **func_kwargs):
"""Run 'bzr serve', and run the given func in a thread once the server
> review needs-info
>
> I don't want to merge this as-is, but I have a guess about what's going on...
> Perhaps it's an IPv6 vs. IPv4 issue?
Exactly (and thanks to fullermd for confirming :-)
> Does the test work if you change it to pass "--port= 127.0.0. 1:0"?
Perfectly.
> The test
> assumes 127.0.0.1 later, so it's reasonable to explicitly pass it here.
Done.
> This change isn't controversial at all :)
Not in this incarnation :-)
It was discussed with Robert *before* submission and modified *during* submission,
so it ends up trivial instead of controversial :)
The whole patch is now:
=== modified file 'bzrlib/ tests/blackbox/ test_serve. py' tests/blackbox/ test_serve. py 2009-08-27 22:17:35 +0000 tests/blackbox/ test_serve. py 2009-09-08 03:31:02 +0000 transport( )
t.mkdir( 'server- root')
self. run_bzr_ serve_then_ func( abspath( 'server- root'), abspath( 'server- root'),
'--allow- writes' ],
self. when_server_ started)
self. assertEqual( ('norepository' ,), self.client_resp) serve_then_ func(self, serve_args, func, *func_args,
* *func_kwargs) :
--- bzrlib/
+++ bzrlib/
@@ -255,14 +255,15 @@
t = self.get_
- ['--port', '0', '--directory', t.local_
+ ['--port', '127.0.0.1:0',
+ '--directory', t.local_
# The when_server_started method issued a find_repositoryV3 that should
# fail with 'norepository' because there are no repositories inside the
# --directory.
-
+
def run_bzr_
"""Run 'bzr serve', and run the given func in a thread once the server
=== modified file 'bzrlib/ tests/test_ smart_transport .py' tests/test_ smart_transport .py 2009-07-08 07:03:38 +0000 tests/test_ smart_transport .py 2009-09-07 09:03:41 +0000
client_ sock.sendall( rest_of_ request_ bytes)
server. _serve_ one_request( server_ protocol)
server_ sock.close( ) l(expected_ response, client_ sock.recv( 50), l(expected_ response, osutils. recv_all( client_ sock, 50),
"Not a version 2 response to 'hello' request.")
self. assertEqual( '', client_ sock.recv( 1))
--- bzrlib/
+++ bzrlib/
@@ -732,7 +732,7 @@
- self.assertEqua
+ self.assertEqua
Is that ok with you ?