File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,8 +64,10 @@ def _create_task_operation(self) -> TaskOperation:
6464 and external_url is not None
6565 )
6666
67+ timeout = int (self .get_duration () * 1.5 )
68+
6769 if use_internet :
68- cmd = f"curl -s -m 30 { external_url } "
70+ cmd = f"curl -s -m { timeout } { external_url } "
6971 expected_string = (
7072 tftbase .get_tft_external_server_string ()
7173 or _INTERNET_DEFAULT_SERVER_STRING
@@ -77,7 +79,7 @@ def _check_success_internet(r: host.Result) -> bool:
7779 else :
7880 server_ip = self .get_target_ip ()
7981 target_port = self .get_target_port ()
80- cmd = f"curl --fail -s --connect-timeout 5 http://{ server_ip } :{ target_port } /data"
82+ cmd = f"curl --fail -s --connect-timeout { timeout } http://{ server_ip } :{ target_port } /data"
8183
8284 def _check_success_podman (r : host .Result ) -> bool :
8385 return r .success and r .match (
Original file line number Diff line number Diff line change @@ -141,8 +141,8 @@ def _create_task_operation(self) -> TaskOperation:
141141 target_port = self .get_target_port ()
142142 cmd = f"{ IPERF_EXE } -c { server_ip } -p { target_port } --json -t { self .get_duration ()} "
143143
144- if self .ts . test_case_id . info . expects_blocked :
145- cmd += " --connect-timeout 5000 "
144+ connect_timeout_ms = int ( self .get_duration () * 1.5 * 1000 )
145+ cmd += f " --connect-timeout { connect_timeout_ms } "
146146
147147 if self .test_type == TestType .IPERF_UDP :
148148 cmd += f" { IPERF_UDP_OPT } "
You can’t perform that action at this time.
0 commit comments