Skip to content

Commit 63cd4df

Browse files
Merge pull request #31548 from jcmoraisjr/OCPBUGS-112662-slows-down-weighted-reqs
OCPBUGS-112662: Fix the number of requests in repeated exec
2 parents cc313a4 + 6982c25 commit 63cd4df

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/extended/router/scoped.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ func expectRouteStatusCodeRepeatedExec(ns, execPodName, url, host string, status
290290

291291
cmd := fmt.Sprintf(`
292292
set -e
293-
STOP=$(($(date '+%%s') + %d))
294-
while [ $(date '+%%s') -lt $STOP ]; do
293+
cnt=0
294+
while [ $cnt -lt %d ]; do
295295
rc=0
296296
code=$( curl %s -s -m 5 -o /dev/null -w '%%{http_code}\n' --header 'Host: %s' %q ) || rc=$?
297297
if [[ "${rc:-0}" -eq 0 ]]; then
@@ -302,6 +302,8 @@ func expectRouteStatusCodeRepeatedExec(ns, execPodName, url, host string, status
302302
else
303303
echo "error ${rc}" 1>&2
304304
fi
305+
sleep 0.5
306+
cnt=$((cnt+1))
305307
done
306308
`, times, args, host, url, statusCode)
307309
output, err := e2eoutput.RunHostCmd(ns, execPodName, cmd)

0 commit comments

Comments
 (0)