Skip to content

Commit

Permalink
[Fix](ms) Fix ci-uncaught ut coredump due to dynamic rate limit setting
Browse files Browse the repository at this point in the history
  • Loading branch information
TangSiyang2001 committed Nov 20, 2024
1 parent 6898b77 commit b6fe01d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cloud/script/run_all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ for i in *_test; do
patchelf --set-rpath "$(pwd)" "${i}"
fi

set -euo pipefail
if [[ "${filter}" == "" ]]; then
LLVM_PROFILE_FILE="./report/${i}.profraw" "./${i}" --gtest_print_time=true --gtest_output="xml:${i}.xml"
else
LLVM_PROFILE_FILE="./report/${i}.profraw" "./${i}" --gtest_print_time=true --gtest_output="xml:${i}.xml" --gtest_filter="${filter}"
fi
set +euo pipefail
unittest_files[${#unittest_files[*]}]="${i}"
echo "--------------------------"
fi
Expand Down
4 changes: 2 additions & 2 deletions cloud/src/meta-service/meta_service_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ static HttpResponse process_adjust_rate_limit(MetaServiceImpl* service, brpc::Co
processors[0b101] = std::move(set_instance_qps_limit);
processors[0b111] = std::move(set_instance_rpc_qps_limit);

uint8_t level = (0x01 & qps_limit_str.empty()) | ((0x01 & rpc_name.empty()) << 1) |
((0x01 & instance_id.empty()) << 2);
uint8_t level = (0x01 & !qps_limit_str.empty()) | ((0x01 & !rpc_name.empty()) << 1) |
((0x01 & !instance_id.empty()) << 2);

DCHECK_LT(level, 8);

Expand Down
1 change: 1 addition & 0 deletions run-cloud-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ cd test
# FILTER: binary_name:gtest_filter
# FILTER: meta_service_test:DetachSchemaKVTest.*
# ./run_all_tests.sh --test "\"$(echo "${FILTER}" | awk -F: '{print $1}')\"" --filter "\"$(echo "${FILTER}" | awk -F: '{print $2}')\"" --fdb "\"${FDB}\""
set -euo pipefail
if [[ "_${ENABLE_CLANG_COVERAGE}" == "_ON" ]]; then
bash -x ./run_all_tests.sh --coverage --test "$(echo "${FILTER}" | awk -F: '{print $1}')" --filter "$(echo "${FILTER}" | awk -F: '{print $2}')" --fdb "${FDB}"
else
Expand Down

0 comments on commit b6fe01d

Please sign in to comment.