[ARVADOS] created: eea5f75077ca5d3adced3ad3d90f755d0fa5b3d8
Git user
git at public.curoverse.com
Mon Apr 4 15:01:16 EDT 2016
at eea5f75077ca5d3adced3ad3d90f755d0fa5b3d8 (commit)
commit eea5f75077ca5d3adced3ad3d90f755d0fa5b3d8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Apr 4 14:59:10 2016 -0400
8712: Test case that reproduces cache-spill bug.
diff --git a/services/fuse/tests/test_cache.py b/services/fuse/tests/test_cache.py
new file mode 100644
index 0000000..fdbaaba
--- /dev/null
+++ b/services/fuse/tests/test_cache.py
@@ -0,0 +1,36 @@
+import arvados
+import arvados.collection
+import arvados_fuse
+import arvados_fuse.command
+import json
+import logging
+import os
+import tempfile
+import unittest
+
+from .integration_test import IntegrationTest
+from .mount_test_base import MountTestBase
+
+class TmpCollectionTest(IntegrationTest):
+ mnt_args = ["--directory-cache=0"]
+
+ @IntegrationTest.mount(argv=mnt_args)
+ def test_cache_spill(self):
+ pdh = []
+ for i in range(0, 8):
+ cw = arvados.collection.Collection()
+ f = cw.open("blurg%i" % i, "w")
+ 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
+ def _test_cache_spill(self, mnt, pdh):
+ for i,v in enumerate(pdh):
+ j = os.path.join(mnt, "by_id", v, "blurg%i" % i)
+ self.assertTrue(os.path.exists(j))
+ for i,v in enumerate(pdh):
+ j = os.path.join(mnt, "by_id", v, "blurg%i" % i)
+ self.assertTrue(os.path.exists(j))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list