[ARVADOS] created: a4469909dc80167a04af0c5d103d3768688b1eb8
Git user
git at public.curoverse.com
Tue Apr 19 17:41:30 EDT 2016
at a4469909dc80167a04af0c5d103d3768688b1eb8 (commit)
commit a4469909dc80167a04af0c5d103d3768688b1eb8
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Apr 15 09:51:22 2016 -0400
8345: Do not run performance-profiling tests unless ENABLE_SLOW_TESTS env var is set.
diff --git a/services/fuse/tests/mount_test_base.py b/services/fuse/tests/mount_test_base.py
index c79daf8..12395d7 100644
--- a/services/fuse/tests/mount_test_base.py
+++ b/services/fuse/tests/mount_test_base.py
@@ -36,6 +36,7 @@ class MountTestBase(unittest.TestCase):
run_test_server.run()
run_test_server.authorize_with("admin")
self.api = api if api else arvados.safeapi.ThreadSafeApiCache(arvados.config.settings())
+ self.llfuse_thread = None
# This is a copy of Mount's method. TODO: Refactor MountTestBase
# to use a Mount instead of copying its code.
@@ -67,12 +68,13 @@ class MountTestBase(unittest.TestCase):
self.pool.join()
del self.pool
- subprocess.call(["fusermount", "-u", "-z", self.mounttmp])
- self.llfuse_thread.join(timeout=1)
- if self.llfuse_thread.is_alive():
- logger.warning("MountTestBase.tearDown():"
- " llfuse thread still alive 1s after umount"
- " -- abandoning and exiting anyway")
+ if self.llfuse_thread:
+ subprocess.call(["fusermount", "-u", "-z", self.mounttmp])
+ self.llfuse_thread.join(timeout=1)
+ if self.llfuse_thread.is_alive():
+ logger.warning("MountTestBase.tearDown():"
+ " llfuse thread still alive 1s after umount"
+ " -- abandoning and exiting anyway")
os.rmdir(self.mounttmp)
if self.keeptmp:
diff --git a/services/fuse/tests/performance/test_collection_performance.py b/services/fuse/tests/performance/test_collection_performance.py
index c4eadca..a975db5 100644
--- a/services/fuse/tests/performance/test_collection_performance.py
+++ b/services/fuse/tests/performance/test_collection_performance.py
@@ -7,6 +7,7 @@ import sys
import unittest
from .. import run_test_server
from ..mount_test_base import MountTestBase
+from ..slow_test import slow_test
logger = logging.getLogger('arvados.arv-mount')
@@ -80,6 +81,7 @@ class CreateCollectionWithMultipleBlocksAndMoveAndDeleteFile(MountTestBase):
def setUp(self):
super(CreateCollectionWithMultipleBlocksAndMoveAndDeleteFile, self).setUp()
+ @slow_test
def test_CreateCollectionWithManyBlocksAndMoveAndDeleteFile(self):
collection = arvados.collection.Collection(api_client=self.api)
collection.save_new()
@@ -215,6 +217,7 @@ class CreateCollectionWithManyFilesAndMoveAndDeleteFile(MountTestBase):
def setUp(self):
super(CreateCollectionWithManyFilesAndMoveAndDeleteFile, self).setUp()
+ @slow_test
def test_CreateCollectionWithManyFilesAndMoveAndDeleteFile(self):
collection = arvados.collection.Collection(api_client=self.api)
collection.save_new()
@@ -327,6 +330,7 @@ class UsingMagicDir_CreateCollectionWithManyFilesAndMoveAndDeleteFile(MountTestB
with open(os.path.join(self.mounttmp, collection, k)) as f:
self.assertEqual(v, f.read())
+ @slow_test
def test_UsingMagicDirCreateCollectionWithManyFilesAndMoveAndDeleteFile(self):
streams = 2
files_per_stream = 200
@@ -382,6 +386,7 @@ class UsingMagicDir_CreateCollectionWithManyFilesAndMoveAllFilesIntoAnother(Moun
collection.save_new()
return collection
+ @slow_test
def test_UsingMagicDirCreateCollectionWithManyFilesAndMoveAllFilesIntoAnother(self):
streams = 2
files_per_stream = 200
@@ -428,6 +433,7 @@ class UsingMagicDir_CreateCollectionWithManyFilesAndMoveEachFileIntoAnother(Moun
self.pool.apply(magicDirTest_MoveFileFromCollection, (self.mounttmp, from_collection.manifest_locator(),
to_collection.manifest_locator(), 'stream0', 'file'+str(j)+'.txt',))
+ @slow_test
def test_UsingMagicDirCreateCollectionWithManyFilesAndMoveEachFileIntoAnother(self):
streams = 2
files_per_stream = 200
@@ -470,6 +476,7 @@ class FuseListLargeProjectContents(MountTestBase):
collection_contents = llfuse.listdir(os.path.join(self.mounttmp, collection_name))
self.assertIn('baz', collection_contents)
+ @slow_test
def test_listLargeProjectContents(self):
self.make_mount(fuse.ProjectDirectory,
project_object=run_test_server.fixture('groups')['project_with_201_collections'])
diff --git a/services/fuse/tests/slow_test.py b/services/fuse/tests/slow_test.py
new file mode 100644
index 0000000..f6dddf0
--- /dev/null
+++ b/services/fuse/tests/slow_test.py
@@ -0,0 +1,6 @@
+import os
+import unittest
+
+slow_test = lambda _: unittest.skipIf(
+ os.environ.get('ENABLE_SLOW_TESTS', '') != '',
+ "ENABLE_SLOW_TESTS is not set")
commit 41ae1911aa323b60b1e827860a02bce09d60cff4
Merge: 6112443 fd696fa
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Apr 19 17:33:20 2016 -0400
Merge branch '8697-ruby187-compat'
refs #8697
refs #8689
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list