diff options
author | Peter Hawkins <phawkins@google.com> | 2017-02-13 15:34:58 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-13 17:24:58 -0800 |
commit | bc225bfaa534acc25047fe844f19edc333b7a76a (patch) | |
tree | fa76941d893ad2e31d0961194c68893a4dc29c5a /tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc | |
parent | d065a5d984794a0e59bc1787010ef4b911d4ef89 (diff) |
Fix code that ignores tensorflow::Status.
Add a new tensorflow::Status::IgnoreError() method to mark call sites where a Status has been intentionally ignored.
Change: 147402405
Diffstat (limited to 'tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc')
-rw-r--r-- | tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc b/tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc index 4e8028b74f..1d09b2ffb2 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc +++ b/tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc @@ -18,6 +18,7 @@ limitations under the License. #include <string> #include <vector> +#include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/util/device_name_utils.h" @@ -56,7 +57,8 @@ TEST(GrpcChannelTest, IsSameAddressSpace) { TEST(GrpcChannelTest, HostPorts) { GrpcChannelSpec spec; - spec.AddHostPortsJob("mnist", {"a:1", "b:2", "c:3", "d:4", "e:5", "f:6"}); + TF_EXPECT_OK(spec.AddHostPortsJob( + "mnist", {"a:1", "b:2", "c:3", "d:4", "e:5", "f:6"})); std::unique_ptr<GrpcChannelCache> cc( NewGrpcChannelCache(spec, NewHostPortGrpcChannel)); EXPECT_EQ(nullptr, cc->FindWorkerChannel("invalid_target")); @@ -96,7 +98,8 @@ TEST(GrpcChannelTest, HostPorts) { TEST(GrpcChannelTest, SparseHostPorts) { GrpcChannelSpec spec; - spec.AddHostPortsJob("mnist", {{0, "a:1"}, {3, "d:4"}, {4, "e:5"}}); + TF_EXPECT_OK( + spec.AddHostPortsJob("mnist", {{0, "a:1"}, {3, "d:4"}, {4, "e:5"}})); std::unique_ptr<GrpcChannelCache> cc( NewGrpcChannelCache(spec, NewHostPortGrpcChannel)); EXPECT_EQ(nullptr, cc->FindWorkerChannel("invalid_target")); |