| 245 | |
| 246 | private: |
| 247 | void LoadCaseSet(const std::string& file_path) { |
| 248 | std::ifstream ifs(file_path.c_str(), std::ios::in); |
| 249 | if (!ifs) { |
| 250 | LOG(FATAL) << "Fail to open case set file: " << file_path; |
| 251 | } |
| 252 | std::string case_set_json((std::istreambuf_iterator<char>(ifs)), |
| 253 | std::istreambuf_iterator<char>()); |
| 254 | test::TestCaseSet case_set; |
| 255 | std::string err; |
| 256 | if (!json2pb::JsonToProtoMessage(case_set_json, &case_set, &err)) { |
| 257 | LOG(FATAL) |
| 258 | << "Fail to trans case_set from json to protobuf message: " |
| 259 | << err; |
| 260 | } |
| 261 | _case_set = case_set; |
| 262 | ifs.close(); |
| 263 | } |
| 264 | |
| 265 | brpc::Server _server; |
| 266 | EchoServiceImpl* _echo_service; |
nothing calls this directly
no test coverage detected