aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/summary/writer/writer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/summary/writer/writer_test.py')
-rw-r--r--tensorflow/python/summary/writer/writer_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/python/summary/writer/writer_test.py b/tensorflow/python/summary/writer/writer_test.py
index b31c41d112..8c34eb82e3 100644
--- a/tensorflow/python/summary/writer/writer_test.py
+++ b/tensorflow/python/summary/writer/writer_test.py
@@ -258,6 +258,15 @@ class SummaryWriterTestCase(test.TestCase):
# We should be done.
self.assertRaises(StopIteration, lambda: next(rr))
+ def testNonBlockingClose(self):
+ test_dir = self._CleanTestDir("non_blocking_close")
+ sw = writer.FileWriter(test_dir)
+ # Sleep 1.2 seconds to make sure event queue is empty.
+ time.sleep(1.2)
+ time_before_close = time.time()
+ sw.close()
+ self._assertRecent(time_before_close)
+
# Checks that values returned from session Run() calls are added correctly to
# summaries. These are numpy types so we need to check they fit in the
# protocol buffers correctly.