Change in vdsm[master]: tests: Fix race in protocoldetector tests
danken at redhat.com
danken at redhat.com
Sun Jan 18 21:41:30 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Fix race in protocoldetector tests
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
Thanks for the patch. This repeated failure annoyed me, too. But please change the text so that future readers of git-log won't assume that we thought that the race was eliminated.
http://gerrit.ovirt.org/#/c/37009/1//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2015-01-17 21:49:45 +0200
Line 4: Commit: Nir Soffer <nsoffer at redhat.com>
Line 5: CommitDate: 2015-01-17 21:49:45 +0200
Line 6:
Line 7: tests: Fix race in protocoldetector tests
fix race -> lower probability of race
adding sleep time can never fix a race.
Line 8:
Line 9: To test removal of stale connections, we were waiting 2 cleanup
Line 10: intervals on the client side, to make sure that the server would wake up
Line 11: and remove the our stale connection.
Line 14: to synchronize with it, it was possible that the server did not wake up
Line 15: yet when the client woke up and try to send a message. This caused
Line 16: test_reject_very_slow_client_concurrency() to fail from time to time.
Line 17:
Line 18: Now we are waiting little more than two internals, so the server always
it's not "always", it's just a lot less probable.
Line 19: wakes up before the client and remove the stale connection.
Line 20:
Line 21: Change-Id: Ib78d48de2521bd63cf270d613786b13e20846107
http://gerrit.ovirt.org/#/c/37009/1/tests/protocoldetectorTests.py
File tests/protocoldetectorTests.py:
Line 180: def check_very_slow_client(self, use_ssl):
Line 181: with self.connect(use_ssl) as client:
Line 182: # We must wait until the acceptor wakes up twice to make sure our
Line 183: # connection is stale and will be removed. Since the acceptor is
Line 184: # running on another thread and we don't have any wayt ot
wayt ot -> way to
then two -> than two
Line 185: # synchronize with it, we must wait little more then two intervals.
Line 186: time.sleep(self.CLEANUP_INTERVAL * 2 + self.GRACETIME)
Line 187: client.sendall("echo too slow probably\n")
Line 188: self.check_disconnected(client)
--
To view, visit http://gerrit.ovirt.org/37009
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib78d48de2521bd63cf270d613786b13e20846107
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list