I like the change, and I like that it makes it more deterministic. I
have a couple of comments that might improve clarity, but nothing that
must be done. So feel free to land this, though think about my comments.
John
=:->
...
def serve(self): self.serving = True
- - self.stopped.clear()
# We are listening and ready to accept connections self.started.set()
[comment] This doesn't seem related or necessary. It would allow us to
run 'serve' multiple times, though I suppose we never specifically
need to.
class FailingDuringResponseHandler(TCPConnectionHandler):
^- [comment] changing the 'self' parameter to not be self seems
confusing. I think I preferred your form using:
test = self
Or even better would be to pass 'self' to the
FailingDuringResponseHandler's __init__ constructor, and saving it as
an attribute. This particular change will conflict landing on bzr.dev,
but should be obvious to fix.
The tests are meant to be roughly identical, except the latter case
marks the exception as ignored. Can we move the common code to a
helper to make it purely obvious that this is the case?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/7/2011 6:34 PM, Vincent Ladeuil wrote: nAThread. test_server_ crash_while_ responding /bugs.launchpad .net/bzr/ +bug/869366 /code.launchpad .net/~vila/ bzr/869366- test-server- race/+merge/ 78634
> Vincent Ladeuil has proposed merging
> lp:~vila/bzr/869366-test-server-race into lp:bzr/2.4.
>
> Requested reviews: bzr-core (bzr-core) Related bugs: Bug #869366 in
> Bazaar: "TestTCPServerI
> random failure" https:/
>
> For more details, see:
> https:/
>
> This is was one of the worst races I had to chase.
>
> For context, this is in bzr-2.4 and only the tests are concerned.
>
merge: approve
I like the change, and I like that it makes it more deterministic. I
have a couple of comments that might improve clarity, but nothing that
must be done. So feel free to land this, though think about my comments.
John
=:->
...
def serve(self):
self. serving = True clear()
self. started. set()
- - self.stopped.
# We are listening and ready to accept connections
[comment] This doesn't seem related or necessary. It would allow us to
run 'serve' multiple times, though I suppose we never specifically
need to.
class FailingDuringRe sponseHandler( TCPConnectionHa ndler):
- - def handle_ connection( self): readline( ) currentThread( ).set_sync_ event(sync) connection( request) :
- - req = self.rfile.
- - threading.
+ def handle_
^- [comment] changing the 'self' parameter to not be self seems
confusing. I think I preferred your form using:
test = self
Or even better would be to pass 'self' to the sponseHandler' s __init__ constructor, and saving it as
FailingDuringRe
an attribute. This particular change will conflict landing on bzr.dev,
but should be obvious to fix.
The tests are meant to be roughly identical, except the latter case enigmail. mozdev. org/
marks the exception as ignored. Can we move the common code to a
helper to make it purely obvious that this is the case?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk6 POyQACgkQJdeBCY SNAAPEMQCeN5NAB M6irUH7z0BRwK9C r9od XTuWmWbh03xR2P9 6U
9MwAni0HIw57Kw7
=/GQC
-----END PGP SIGNATURE-----