From 198416952272bebdd1291200ebd80198c7a59461 Mon Sep 17 00:00:00 2001 From: Ryoji Kurosawa Date: Thu, 20 Feb 2025 18:26:22 +0900 Subject: [PATCH] test: fix test runner to detect statement execution error --- mock/jogasaki/utils/runner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mock/jogasaki/utils/runner.cpp b/mock/jogasaki/utils/runner.cpp index f233a584..d4607f82 100644 --- a/mock/jogasaki/utils/runner.cpp +++ b/mock/jogasaki/utils/runner.cpp @@ -120,7 +120,7 @@ runner& runner::run() { } else { // Call api for statement (i.e. no result records). // There is no execute() api without requesting result set, so use execute_async with sync = true - if(! executor::execute_async( + if((! executor::execute_async( get_impl(*db_), tc, maybe_shared_ptr{stmt.get()}, @@ -131,8 +131,8 @@ runner& runner::run() { *out_stats = stats; }, request_info{}, - true - ) && + true) || + res != status::ok) && ! expect_error_) { exec_fail(string_builder{} << "execution failed. executor::execute() - " << (*out)->message() << string_builder::to_string); }