From acc605c9a718b03d12f61386d922a8390e1bf23c Mon Sep 17 00:00:00 2001 From: Valentin David Date: Thu, 11 Apr 2024 14:50:49 +0200 Subject: [PATCH] tests: set ServerAliveInterval in case ssh server stops answering --- tests/lib/nested.sh | 2 +- tests/lib/prepare-utils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/nested.sh b/tests/lib/nested.sh index 9d40941b..351d662d 100644 --- a/tests/lib/nested.sh +++ b/tests/lib/nested.sh @@ -6,7 +6,7 @@ MON_PORT=${MON_PORT:-8888} IMAGE_FILE="${WORK_DIR}/ubuntu-core-24.img" execute_remote(){ - sshpass -p ubuntu ssh -p "$SSH_PORT" -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@localhost "$*" + sshpass -p ubuntu ssh -p "$SSH_PORT" -o ServerAliveInterval=60 -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@localhost "$*" } wait_for_ssh(){ diff --git a/tests/lib/prepare-utils.sh b/tests/lib/prepare-utils.sh index acb3d730..51e0d2ef 100644 --- a/tests/lib/prepare-utils.sh +++ b/tests/lib/prepare-utils.sh @@ -7,7 +7,7 @@ SSH_PORT=${SSH_PORT:-8022} MON_PORT=${MON_PORT:-8888} execute_remote(){ - sshpass -p ubuntu ssh -p "$SSH_PORT" -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@localhost "$*" + sshpass -p ubuntu ssh -p "$SSH_PORT" -o ServerAliveInterval=60 -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@localhost "$*" } wait_for_ssh(){