mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-08-09 09:51:49 +08:00
test-script-multi-user: Fix timeout: move sleep 600 inside connect branch
The sleep-connect-script blocked on both connect and disconnect invocations. When the server shuts down, two disconnect scripts race past the test -f check simultaneously and both sleep 600s, exceeding the test timeout. Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
+1
-1
@@ -225,7 +225,7 @@ if get_option('root-tests')
|
|||||||
|
|
||||||
test('test-script-multi-user', find_program('test-script-multi-user'),
|
test('test-script-multi-user', find_program('test-script-multi-user'),
|
||||||
env: test_env,
|
env: test_env,
|
||||||
timeout: 360,
|
timeout: 700,
|
||||||
is_parallel: false,
|
is_parallel: false,
|
||||||
workdir: test_workdir,
|
workdir: test_workdir,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if ! test -f test-sleep.tmp;then
|
|
||||||
touch test-sleep.tmp
|
|
||||||
sleep 600
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$REASON" in
|
case "$REASON" in
|
||||||
connect)
|
connect)
|
||||||
|
if ! test -f test-sleep.tmp;then
|
||||||
|
touch test-sleep.tmp
|
||||||
|
sleep 600
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
disconnect)
|
disconnect)
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user