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/cc/training/queue_runner_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/cc/training/queue_runner_test.cc')
-rw-r--r-- | tensorflow/cc/training/queue_runner_test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/cc/training/queue_runner_test.cc b/tensorflow/cc/training/queue_runner_test.cc index 1661c5c91b..27c302ab28 100644 --- a/tensorflow/cc/training/queue_runner_test.cc +++ b/tensorflow/cc/training/queue_runner_test.cc @@ -293,7 +293,7 @@ TEST(QueueRunnerTest, StartTimeout) { // This will timeout since queue0 is not fed and queue1 is fetching data from // queue0. EXPECT_EQ(qr->Start(session.get(), 1).code(), Code::DEADLINE_EXCEEDED); - session->Close(); + TF_EXPECT_OK(session->Close()); } TEST(QueueRunnerTest, TestCoordinatorStop) { @@ -317,8 +317,8 @@ TEST(QueueRunnerTest, TestCoordinatorStop) { TF_EXPECT_OK(QueueRunner::New(queue_runner1, &coord, &qr1)); TF_CHECK_OK(qr1->Start(session.get())); - coord.RegisterRunner(std::move(qr0)); - coord.RegisterRunner(std::move(qr1)); + TF_EXPECT_OK(coord.RegisterRunner(std::move(qr0))); + TF_EXPECT_OK(coord.RegisterRunner(std::move(qr1))); std::vector<Tensor> dq; TF_EXPECT_OK(session->Run({}, {kDequeueOp1}, {}, &dq)); @@ -340,7 +340,7 @@ TEST(QueueRunnerTest, CallbackCalledOnError) { bool error_caught = false; qr->AddErrorCallback([&error_caught](const Status&) { error_caught = true; }); TF_EXPECT_OK(qr->Start(session.get())); - qr->Join(); + EXPECT_FALSE(qr->Join().ok()); EXPECT_TRUE(error_caught); } |