Skip to content

Commit c59c8a4

Browse files
Automated Code Change
PiperOrigin-RevId: 775567269
1 parent ca7a806 commit c59c8a4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tensorflow_serving/core/aspired_versions_manager_builder_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TEST_F(AspiredVersionsManagerBuilderTest, AddSourceChainConnection) {
9191
servable_state_monitor_, id, {ServableState::ManagerState::kAvailable});
9292

9393
ServableHandle<StoragePath> handle;
94-
const Status status =
94+
const absl::Status status =
9595
manager->GetServableHandle(ServableRequest::FromId(id), &handle);
9696
EXPECT_EQ(StoragePath("/storage/path/adapter0/adapter1/adapter2"), *handle);
9797
}

tensorflow_serving/core/caching_manager_test.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class StringLoaderFactory : public CachingManager::LoaderFactory {
6565
auto servable_creator = [&](std::unique_ptr<string>* servable) {
6666
servable->reset(new string);
6767
**servable = strings::StrCat(id.name, "-", id.version);
68-
return OkStatus();
68+
return absl::OkStatus();
6969
};
7070
std::unique_ptr<Loader> loader;
7171
loader.reset(new SimpleLoader<string>(
@@ -346,7 +346,7 @@ TEST_P(CachingManagerTest, ServableHandleWrongType) {
346346
// The servable is supposed to be of type string, but we request for a handle
347347
// of type int. This should cause an invalid argument error.
348348
ServableHandle<int> handle;
349-
const Status status = manager_->GetServableHandle(
349+
const absl::Status status = manager_->GetServableHandle(
350350
ServableRequest::FromId({kServableName, 30}), &handle);
351351
ASSERT_FALSE(status.ok()) << status;
352352
EXPECT_EQ(error::INVALID_ARGUMENT, status.code());
@@ -357,7 +357,7 @@ TEST_P(CachingManagerTest, ServableHandleError) {
357357
std::unique_ptr<CachingManager> error_manager =
358358
CreateManagerWithErrorLoaderFactory();
359359
ServableHandle<string> handle;
360-
const Status status = error_manager->GetServableHandle(
360+
const absl::Status status = error_manager->GetServableHandle(
361361
ServableRequest::FromId({kServableName, 30}), &handle);
362362
EXPECT_FALSE(status.ok()) << status;
363363
}
@@ -419,7 +419,7 @@ TEST_P(CachingManagerTest, AvailableServableHandlesError) {
419419
std::unique_ptr<CachingManager> error_manager =
420420
CreateManagerWithErrorLoaderFactory();
421421
ServableHandle<string> handle;
422-
const Status status = error_manager->GetServableHandle(
422+
const absl::Status status = error_manager->GetServableHandle(
423423
ServableRequest::FromId({kServableName, 30}), &handle);
424424
ASSERT_FALSE(status.ok()) << status;
425425
std::map<ServableId, ServableHandle<string>> handles =
@@ -474,7 +474,7 @@ TEST_P(CachingManagerTest, EventBusSingleRequest) {
474474
// Check that the state published on the event-bus matches produced by the
475475
// loader-factory for a successful request.
476476
const ServableState expected_published_state = {
477-
id, ServableState::ManagerState::kAvailable, OkStatus()};
477+
id, ServableState::ManagerState::kAvailable, absl::OkStatus()};
478478
EXPECT_THAT(*servable_state_monitor_.GetState(id),
479479
EqualsServableState(expected_published_state));
480480
}
@@ -485,7 +485,7 @@ TEST_P(CachingManagerTest, EventBusErrorHandle) {
485485
CreateManagerWithErrorLoaderFactory();
486486
ServableHandle<string> handle;
487487
const ServableId id = {kServableName, 30};
488-
const Status status =
488+
const absl::Status status =
489489
error_manager->GetServableHandle(ServableRequest::FromId(id), &handle);
490490
// Check that the state published on the event-bus matches that produced
491491
// by the loader-factory for an error.
@@ -502,14 +502,14 @@ TEST_P(CachingManagerTest, EventBusErrorHandle) {
502502
TEST_P(CachingManagerTest, ConcurrentDisjointRequests) {
503503
// Track the status of each request.
504504
mutex status_mu;
505-
std::vector<Status> statuses(4);
505+
std::vector<absl::Status> statuses(4);
506506
{
507507
ThreadPoolExecutor request_executor(Env::Default(), "GetHandles",
508508
kNumThreads);
509509
for (int i = 0; i < 4; i++) {
510510
request_executor.Schedule([this, i, &statuses, &status_mu]() {
511511
ServableHandle<string> handle;
512-
const Status status =
512+
const absl::Status status =
513513
manager_->GetServableHandle({kServableName, i + 30}, &handle);
514514
mutex_lock l(status_mu);
515515
statuses[i] = status;
@@ -519,7 +519,7 @@ TEST_P(CachingManagerTest, ConcurrentDisjointRequests) {
519519
// Check that all requests returned with an ok status.
520520
for (int i = 0; i < 4; i++) {
521521
mutex_lock l(status_mu);
522-
EXPECT_EQ(OkStatus(), statuses[i]);
522+
EXPECT_EQ(absl::OkStatus(), statuses[i]);
523523
}
524524
// Check that the available servable handles now includes all requested
525525
// servables.
@@ -542,7 +542,7 @@ TEST_P(CachingManagerTest, ConcurrentDisjointRequests) {
542542

543543
TEST_P(CachingManagerTest, ConcurrentIntersectingRequests) {
544544
mutex status_mu;
545-
std::vector<Status> statuses(8);
545+
std::vector<absl::Status> statuses(8);
546546
{
547547
ThreadPoolExecutor request_executor(Env::Default(), "GetHandles",
548548
kNumThreads);
@@ -552,7 +552,7 @@ TEST_P(CachingManagerTest, ConcurrentIntersectingRequests) {
552552
const ServableId id = {kServableName, version};
553553
request_executor.Schedule([this, i, id, &statuses, &status_mu]() {
554554
ServableHandle<string> handle;
555-
const Status status =
555+
const absl::Status status =
556556
manager_->GetServableHandle(ServableRequest::FromId(id), &handle);
557557
mutex_lock l(status_mu);
558558
statuses[i] = status;
@@ -562,7 +562,7 @@ TEST_P(CachingManagerTest, ConcurrentIntersectingRequests) {
562562
// Check that all requests returned with an ok status.
563563
for (int i = 0; i < 8; i++) {
564564
mutex_lock l(status_mu);
565-
EXPECT_EQ(OkStatus(), statuses[i]);
565+
EXPECT_EQ(absl::OkStatus(), statuses[i]);
566566
}
567567
// Check that the available servable handles now includes all requested
568568
// servables.

0 commit comments

Comments
 (0)