From 49fda881992177f61e459d0f05959897b43a4756 Mon Sep 17 00:00:00 2001 From: mloviska Date: Tue, 26 Mar 2024 15:05:27 +0100 Subject: [PATCH] Dont die on time when reaching QA DBs When there is a connection issue with QA DBs we dont want the test to die. --- lib/db_utils.pm | 4 ++-- tests/jeos/image_info.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/db_utils.pm b/lib/db_utils.pm index 56f2e349a020..4b38c117bf92 100644 --- a/lib/db_utils.pm +++ b/lib/db_utils.pm @@ -184,7 +184,7 @@ sub push_image_data_to_db { # return to the caller that conflict has been found # caller should exit the test case module immediately } else { - record_soft_failure("poo#113120 - There has been a problem pushing data to the $table. RC => " . $res->code); + record_info("There has been a problem pushing data to the $table. RC => " . $res->code, result => 'softfail'); } return $res->code; @@ -225,7 +225,7 @@ sub check_postgres_db { # Empty records will return '{"results":[{"statement_id":0}]}' # Existing records will return '{"results":[{"statement_id":0,"series":[{"name":"size","columns":["time","value"],"values"' ... my $request = "curl -IfLv 'http://$db_ip:$db_port/$db_db'"; - if (script_run("$request 2>&1 >/var/tmp/db_curl.tmp") != 0) { + if (script_run("$request 2>&1 >/var/tmp/db_curl.tmp", timeout => 120, die_on_timeout => 0) != 0) { my $output = script_output("cat /var/tmp/db_curl.tmp"); record_info("db error", "cannot reach POSTGREST database\n$request\n$output", result => 'fail'); return 0; diff --git a/tests/jeos/image_info.pm b/tests/jeos/image_info.pm index f926936389c0..d76ce9cc2ddf 100644 --- a/tests/jeos/image_info.pm +++ b/tests/jeos/image_info.pm @@ -63,7 +63,7 @@ sub run { # DB availability check unless (check_postgres_db) { - record_soft_failure("poo#110221 - DB is not available!"); + record_info("DB is not available!", result => 'softfail'); return 1; }