moler icon indicating copy to clipboard operation
moler copied to clipboard

missing api to ensure iperf server started

Open greg-latuszek opened this issue 4 years ago • 0 comments

let's assume you have 2 unix devices. You take iperf command

svr = unix1.get_cmd("iperf", cmd_params={'options': '-s -i 1')
run_client = unix2.get_cmd("iperf", cmd_params={'options': '-c {} -i 1 -t 10'.format(server_ip))

then you need to add sleep to let server start:

svr.start(timeout=15)
time.sleep(1)
client_report = run_client(timeout=15)

would be great to let it express as:

svr.start(timeout=15)
svr.await_started(timeout=1)
client_report = run_client(timeout=15)

greg-latuszek avatar Sep 27 '19 13:09 greg-latuszek