Skip to content

Commit

Permalink
Merge pull request #18959 from mloviska/db_dont_die_to
Browse files Browse the repository at this point in the history
Dont die on time when reaching QA DBs
  • Loading branch information
asmorodskyi authored Mar 26, 2024
2 parents f934636 + 49fda88 commit c3f77af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/db_utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/jeos/image_info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c3f77af

Please sign in to comment.