aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/training
diff options
context:
space:
mode:
authorGravatar Yuefeng Zhou <yuefengz@google.com>2017-04-25 13:49:14 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-25 15:05:33 -0700
commitc19dd491e57c6ed8f4aedec69d6653478f5824ee (patch)
treeee76753391d0ece2051ee4053c9379d7073002a6 /tensorflow/cc/training
parent9509cda97d3f4af8ffc1b3aff5fbddc158ff7440 (diff)
Fix queue runner test flakiness. The cost graph may be requested before cost_graph_ is stored.
Change: 154224628
Diffstat (limited to 'tensorflow/cc/training')
-rw-r--r--tensorflow/cc/training/queue_runner_test.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/cc/training/queue_runner_test.cc b/tensorflow/cc/training/queue_runner_test.cc
index e814be8630..da2fc03b6c 100644
--- a/tensorflow/cc/training/queue_runner_test.cc
+++ b/tensorflow/cc/training/queue_runner_test.cc
@@ -379,6 +379,9 @@ TEST(QueueRunnerTest, RunMetaDataTest) {
// race condition where we close the queue before it was populated.
std::vector<Tensor> dq0;
TF_EXPECT_OK(session->Run({}, {kDequeueOp0}, {}, &dq0));
+ // Second call to run dequeue op is to make sure the cost graph has been
+ // stored.
+ TF_EXPECT_OK(session->Run({}, {kDequeueOp0}, {}, &dq0));
CostGraphDef cost_graph;
TF_CHECK_OK(qr->ExportCostGraph(&cost_graph));