Skip to content

Commit

Permalink
test: fix error_info_factory_test for recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kuron99 committed Nov 7, 2024
1 parent 4c2d1ee commit 975d9e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/jogasaki/error/error_info_factory_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ TEST_F(error_info_factory_test, basic) {

TEST_F(error_info_factory_test, stacktrace) {
request_context rctx{};
jogasaki::error::set_error_impl(rctx, error_code::sql_service_exception, "msg", __FILE__, line_number_string, status::ok, true);
jogasaki::error::set_error_impl(rctx, error_code::sql_service_exception, "", __FILE__, line_number_string, status::ok, true);
auto errinfo = rctx.error_info();
ASSERT_TRUE(errinfo);
LOG(INFO) << *errinfo;

// manually check if stacktrace is readable with correct line breaks
auto j = nlohmann::json::parse(errinfo->supplemental_text());
auto j = nlohmann::json::parse(errinfo->message());
std::cerr << j["stacktrace"].get<std::string>();
}
}
Expand Down

0 comments on commit 975d9e4

Please sign in to comment.