From Dan Kenigsberg <dan...@redhat.com>: Dan Kenigsberg has submitted this change and it was merged.
Change subject: mailbox: Allow shorter wait timeout for testing ...................................................................... mailbox: Allow shorter wait timeout for testing The storage thread pool uses a crappy method for checking if threads should exit; each thread is waiting on the message queue op to waitTimeout seconds and check if the thread was terminated. For mailbox testing, we are using 0.1 seconds monitorInterval, to avoid unneeded delays during the test, but when we stop the test, we wait about 6 seconds until the mailbox thread pools are stopped. This is cause by using constant 3 seconds wait time in the thread pool. Compute the wait timeout using the monitor interval, so we keep the runtime behavior the same, but can use shorter timeouts for testing, speeding up the mailbox tests: $ ./run_tests_local.sh storage_mailbox_test.py tests.storage_mailbox_test.SPM_MailMonitorTests testThreadLeak OK tests.storage_mailbox_test.TestMailbox test_send_receive OK ---------------------------------------------------------------------- Ran 2 tests in 0.608s Before this change, the tests needed more then 6 seconds, and were marked as slowtest. Change-Id: Ifcfb94b5bae7f5e7c9d077c44b63594d10f79bc9 Signed-off-by: Nir Soffer <nsof...@redhat.com> --- M tests/storage_mailbox_test.py M vdsm/storage/storage_mailbox.py 2 files changed, 16 insertions(+), 7 deletions(-) Approvals: Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/69033 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifcfb94b5bae7f5e7c9d077c44b63594d10f79bc9 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org