Skip to content

Commit

Permalink
add tip when check status type failed
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo committed Nov 14, 2024
1 parent 89ef50a commit d73af29
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions be/test/common/status_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,16 @@ TEST_F(StatusTest, TStatusCodeWithStatus) {
continue;
}
EXPECT_TRUE(tstatus_st.first < ErrorCode::MAX_ERROR_CODE_DEFINE_NUM);
EXPECT_TRUE(ErrorCode::error_states[tstatus_st.first].description.compare(
tstatus_st.second) == 0);
bool ret = ErrorCode::error_states[tstatus_st.first].description.compare(
tstatus_st.second) == 0;
if (!ret) {
std::cout << "ErrorCode::error_states's " << tstatus_st.first << " compare to "
<< tstatus_st.second
<< " failed. you need check whether TStatusCode defined in thrift "
"is same with ERROR_CODES in status.h"
<< std::endl;
}
EXPECT_TRUE(ret);
}
}

Expand Down

0 comments on commit d73af29

Please sign in to comment.