Make test_ping_dscp stable again
Sometimes this test fails because it starts a tcpdump capture in background and sends a ping before the tcpdump process actually starts capturing packets With this patch, the number of pings sent is 5, which takes 5 seconds and this should be enough time for the tcpdump process to start capturing Change-Id: I33ac13389a5610021074edb0eee7980fd1e99718
This commit is contained in:
parent
cb8033ed4c
commit
5da052f7e5
@ -45,9 +45,9 @@ def start_capture(capture_file: str,
|
||||
|
||||
command = _interface.get_tcpdump_command(parameters)
|
||||
|
||||
LOG.debug("Capturing traffic with the following command in background: %s",
|
||||
command)
|
||||
# when ssh_client is None, an ssh session is created on localhost
|
||||
|
||||
# using a process we run a fire and forget tcpdump command
|
||||
process = sh.process(command=command,
|
||||
ssh_client=ssh_client,
|
||||
sudo=True)
|
||||
|
@ -14,8 +14,6 @@
|
||||
# under the License.
|
||||
from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
|
||||
from oslo_log import log
|
||||
import testtools
|
||||
|
||||
@ -71,9 +69,8 @@ class QoSNetworkTest(testtools.TestCase):
|
||||
interface=interface,
|
||||
capture_filter=capture_filter,
|
||||
capture_timeout=60)
|
||||
time.sleep(1)
|
||||
# send a ping to the server
|
||||
ping.assert_reachable_hosts([self.server.floating_ip_address],)
|
||||
ping.assert_reachable_hosts([self.server.floating_ip_address], count=5)
|
||||
# stop tcpdump and get the pcap capture
|
||||
pcap = tcpdump.get_pcap(process, capture_file=capture_file)
|
||||
# check the capture is not empty
|
||||
|
Loading…
x
Reference in New Issue
Block a user