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:
Nikos Mavrogiannopoulos
2026-03-16 19:54:59 +01:00
parent 18401eb298
commit 7e00f4247a
2 changed files with 5 additions and 6 deletions

View File

@@ -225,7 +225,7 @@ if get_option('root-tests')
test('test-script-multi-user', find_program('test-script-multi-user'),
env: test_env,
timeout: 360,
timeout: 700,
is_parallel: false,
workdir: test_workdir,
)

View File

@@ -1,12 +1,11 @@
#!/bin/sh
if ! test -f test-sleep.tmp;then
touch test-sleep.tmp
sleep 600
fi
case "$REASON" in
connect)
if ! test -f test-sleep.tmp;then
touch test-sleep.tmp
sleep 600
fi
;;
disconnect)
;;