@@ -85,7 +85,8 @@ class TFRTHttpRestApiHandlerTest : public ::testing::Test {
85
85
TFRTHttpRestApiHandlerTest ()
86
86
: handler_(/* timeout_in_ms=*/ 10000 , GetServerCore()) {}
87
87
88
- static Status CreateServerCore (std::unique_ptr<ServerCore>* server_core) {
88
+ static absl::Status CreateServerCore (
89
+ std::unique_ptr<ServerCore>* server_core) {
89
90
ModelServerConfig config;
90
91
auto model_config = config.mutable_model_config_list ()->add_config ();
91
92
model_config->set_name (kTestModelName );
@@ -158,7 +159,7 @@ class TFRTHttpRestApiHandlerTest : public ::testing::Test {
158
159
159
160
std::unique_ptr<ServerCore> TFRTHttpRestApiHandlerTest::server_core_;
160
161
161
- Status CompareJson (const string& json1, const string& json2) {
162
+ absl:: Status CompareJson (const string& json1, const string& json2) {
162
163
rapidjson::Document doc1;
163
164
if (doc1.Parse (json1.c_str ()).HasParseError ()) {
164
165
return errors::InvalidArgument (
@@ -175,7 +176,7 @@ Status CompareJson(const string& json1, const string& json2) {
175
176
return errors::InvalidArgument (" JSON Different. JSON1: " , json1,
176
177
" JSON2: " , json2);
177
178
}
178
- return Status ();
179
+ return absl:: Status ();
179
180
}
180
181
181
182
TEST_F (TFRTHttpRestApiHandlerTest, kPathRegex ) {
@@ -187,7 +188,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, kPathRegex) {
187
188
TEST_F (TFRTHttpRestApiHandlerTest, UnsupportedApiCalls) {
188
189
HeaderList headers;
189
190
string model_name, method, output;
190
- Status status;
191
+ absl:: Status status;
191
192
status = handler_.ProcessRequest (" GET" , " /v1/foo" , " " , &headers, &model_name,
192
193
&method, &output);
193
194
EXPECT_TRUE (errors::IsInvalidArgument (status));
@@ -264,7 +265,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, UnsupportedApiCalls) {
264
265
TEST_F (TFRTHttpRestApiHandlerTest, PredictModelNameVersionErrors) {
265
266
HeaderList headers;
266
267
string model_name, method, output;
267
- Status status;
268
+ absl:: Status status;
268
269
// 'foo' is not a valid model name.
269
270
status = handler_.ProcessRequest (" POST" , " /v1/models/foo:predict" ,
270
271
R"( { "instances": [1] })" , &headers,
@@ -287,7 +288,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, PredictModelNameVersionErrors) {
287
288
TEST_F (TFRTHttpRestApiHandlerTest, PredictRequestErrors) {
288
289
HeaderList headers;
289
290
string model_name, method, output;
290
- Status status;
291
+ absl:: Status status;
291
292
const string& req_path =
292
293
absl::StrCat (" /v1/models/" , kTestModelName , " :predict" );
293
294
@@ -334,7 +335,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, PredictRequestErrors) {
334
335
TEST_F (TFRTHttpRestApiHandlerTest, Predict) {
335
336
HeaderList headers;
336
337
string model_name, method, output;
337
- Status status;
338
+ absl:: Status status;
338
339
// Query latest version.
339
340
TF_EXPECT_OK (handler_.ProcessRequest (
340
341
" POST" , absl::StrCat (" /v1/models/" , kTestModelName , " :predict" ),
@@ -391,7 +392,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, Predict) {
391
392
TEST_F (TFRTHttpRestApiHandlerTest, Regress) {
392
393
HeaderList headers;
393
394
string model_name, method, output;
394
- Status status;
395
+ absl:: Status status;
395
396
// Query latest version.
396
397
TF_EXPECT_OK (handler_.ProcessRequest (
397
398
" POST" , absl::StrCat (" /v1/models/" , kTestModelName , " :regress" ),
@@ -427,7 +428,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, Regress) {
427
428
TEST_F (TFRTHttpRestApiHandlerTest, Classify) {
428
429
HeaderList headers;
429
430
string model_name, method, output;
430
- Status status;
431
+ absl:: Status status;
431
432
// Query latest version.
432
433
TF_EXPECT_OK (handler_.ProcessRequest (
433
434
" POST" , absl::StrCat (" /v1/models/" , kTestModelName , " :classify" ),
@@ -452,7 +453,7 @@ TEST_F(TFRTHttpRestApiHandlerTest, Classify) {
452
453
TEST_F (TFRTHttpRestApiHandlerTest, GetStatus) {
453
454
HeaderList headers;
454
455
string model_name, method, output;
455
- Status status;
456
+ absl:: Status status;
456
457
457
458
// Get status for all versions.
458
459
TF_EXPECT_OK (handler_.ProcessRequest (
0 commit comments