Dan Kenigsberg has submitted this change and it was merged.

Change subject: protocoldetector: Fix race in protocoldetector tests
......................................................................


protocoldetector: Fix race in protocoldetector tests

To test removal of stale connections, we were waiting 2 cleanup
intervals on the client side, to make sure that the server would wake up
and remove the our stale connection.

However, since the server runs in a separate thread, and the cleanup
timeout was initialized when the server was started, it was possible
that the server did not wake up yet when the client woke up and try to
send a message. This caused test_reject_very_slow_client_concurrency()
to fail from time to time.

Now we initialize _next_cleanup when the object is created, so we know
exactly when the server should wake up, eliminiating this race.

Change-Id: Ic51f502172ccaf960dd1d9d33f7410d23f7fc491
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/37046
Reviewed-by: Piotr Kliczewski <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M tests/protocoldetectorTests.py
M vdsm/protocoldetector.py
2 files changed, 12 insertions(+), 6 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Nir Soffer: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/37046
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic51f502172ccaf960dd1d9d33f7410d23f7fc491
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to