aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/summary/impl/directory_watcher_test.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-07-25 11:08:09 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-07-25 12:17:57 -0700
commitdd50627497ee4d0c0448041d4bcf79cb8e8eeb1a (patch)
tree2af65641f4c387d86f947993fa2fbd57f2298ea8 /tensorflow/python/summary/impl/directory_watcher_test.py
parente4097295e19d689740e335299b0311612818f4fb (diff)
Keep loading TensorBoard events even if directories or files are deleted.
In the event of an IOError/OSError, we log an error and continue on. We don't delete any previously-loaded data for that run since losing data is Bad and we wouldn't want to drop a run just because of a transient IO failure. Change: 128384809
Diffstat (limited to 'tensorflow/python/summary/impl/directory_watcher_test.py')
-rw-r--r--tensorflow/python/summary/impl/directory_watcher_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/python/summary/impl/directory_watcher_test.py b/tensorflow/python/summary/impl/directory_watcher_test.py
index d699a89376..531cd7d98f 100644
--- a/tensorflow/python/summary/impl/directory_watcher_test.py
+++ b/tensorflow/python/summary/impl/directory_watcher_test.py
@@ -154,6 +154,13 @@ class DirectoryWatcherTest(test_util.TensorFlowTestCase):
self._LoadAllEvents()
self.assertTrue(self._watcher.OutOfOrderWritesDetected())
+ def testDoesntCrashWhenFileIsDeleted(self):
+ self._WriteToFile('a', 'a')
+ self._LoadAllEvents()
+ os.remove(os.path.join(self._directory, 'a'))
+ self._WriteToFile('b', 'b')
+ self.assertWatcherYields(['b'])
+
if __name__ == '__main__':
googletest.main()