Comment 2 for bug 1838068

Reviewed: https://review.opendev.org/673023
Committed: https://git.openstack.org/cgit/openstack/neutron-tempest-plugin/commit/?id=fa5ebc4b98e4964b73210e38772af50e2524be3b
Submitter: Zuul
Branch: master

commit fa5ebc4b98e4964b73210e38772af50e2524be3b
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Jul 26 17:02:40 2019 +0000

    Refactor the test_qos.QoSTestMixin._check_bw function

    Improved the robustness of this function:
    - The remote process ("nc"), will be stopped both at the beginning and
      the end of this function, just to ensure the process is not left
      running at the beginning of the next check.
    - The socket connection is closed when the file is received (or in case
      of exception). This will close the client socket and will end the "nc"
      process in the remote VM.
    - Set a socket timeout. This timeout, specifically defined for each
      iteration, depending on the expected bandwidth, will force a quick
      timeout while receiving from the remote VM. The check will fail and it
      will be tested again, if the "FILE_DOWNLOAD_TIMEOUT" didn't happen yet.

    Change-Id: I5ce1a34f7d5d635002baa1e5b14c288e6d2bc43e
    Closes-Bug: #1838068