[MERGE] Misc fixes for win32
Vincent Ladeuil
v.ladeuil+lp at free.fr
Sun Dec 30 19:42:25 GMT 2007
>>>>> "aaron" == Aaron Bentley <aaron at aaronbentley.com> writes:
aaron> Vincent Ladeuil wrote:
>>>>>>> "aaron" == Aaron Bentley <aaron at aaronbentley.com> writes:
>>
>> <snip/>
>>
aaron> Unfortunately, the HTTP tests are a real mess.
>>
>> So nice to say ;-)
aaron> Well, I wasn't trying to *blame* anyone.
Don't worry, I was joking about *my* refactoring which,
hopefully, helped a bit. And yes, I suffered many hangs myself
along the way and thought that the tests were messy until I fully
understand the server behavior.
>> Try my latest patch on the subject and report please, it should
>> help *a lot*.
>>
>> http://bundlebuggy.aaronbentley.com/request/%3Cm2k5my21jz.fsf@free.fr%3E
aaron> It does. Thanks for pointing it out.
aaron> I had to tweak it slightly:
Thanks for that. Do you still have the tests that were triggering
that one ? Could it be because no connection were done to the
server ?
aaron> --- http_server.py 2007-12-30 11:52:11.000000000 -0500
aaron> +++ /mnt/ntfs/bzr.win32fixes/bzrlib/tests/http_server.py
aaron> 2007-12-30 12:07:22.000000000 -0500
aaron> @@ -344,7 +344,11 @@
aaron> # that since the server is in a blocking operation and since
aaron> python
aaron> # use select internally, shutting down the socket is reliable and
aaron> # relatively clean.
aaron> - self.socket.shutdown(socket.SHUT_RDWR)
aaron> + try:
aaron> + self.socket.shutdown(socket.SHUT_RDWR)
aaron> + except socket.error, e:
aaron> + if e.args[0] != 10057:
aaron> + raise
aaron> # Let the server properly close the socket
aaron> self.server_close()
aaron> After that, the tests that had been failing due to http server issues
aaron> passed.
Great !
Vincent
More information about the bazaar
mailing list