8712: Set self.collection = None when clearing the contents of a
authorPeter Amstutz <peter.amstutz@curoverse.com>
Mon, 4 Apr 2016 19:40:33 +0000 (15:40 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Mon, 4 Apr 2016 19:40:33 +0000 (15:40 -0400)
CollectionDirectory, so that it gets properly reloaded on update().

services/fuse/arvados_fuse/fusedir.py
services/fuse/tests/test_cache.py

index 196bb221e901e132d10db4f2bdbd7ed060f794e3..bfcf0ef5ba62f111308d8a895d57cb2dc6ad8e5b 100644 (file)
@@ -320,6 +320,10 @@ class CollectionDirectoryBase(Directory):
         self.flush()
         src.flush()
 
+    def clear(self, force=False):
+        super(CollectionDirectoryBase, self).clear(force)
+        self.collection = None
+
 
 class CollectionDirectory(CollectionDirectoryBase):
     """Represents the root of a directory tree representing a collection."""
index fdbaaba42cb79c16834becc7424494449e05260d..7dab2c582150a8bd0d5db02eb2fb4def389f8b17 100644 (file)
@@ -23,7 +23,6 @@ class TmpCollectionTest(IntegrationTest):
             f.write("bloop%i" % i)
             cw.save_new()
             pdh.append(cw.portable_data_hash())
-            print cw.portable_data_hash(), cw.manifest_text()
         self.pool_test(self.mnt, pdh)
 
     @staticmethod