]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: add @long_running decorator
authorJohn Spray <john.spray@redhat.com>
Mon, 27 Jul 2015 22:21:45 +0000 (23:21 +0100)
committerJohn Spray <john.spray@redhat.com>
Fri, 2 Oct 2015 16:41:16 +0000 (17:41 +0100)
A means for test cases to mark particular methods
as long running, so that the vstart runner can skip
them when running for developers.

This is not a scientific thing, anything that takes
more than about 2 minutes due to lots of iteration
or sleeps.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/cephfs_test_case.py

index 3f8ff20198b85bba595800a5931db717bcc01451..9cbe5bdee289f5a5bf11b9a9790fe1a8be0acd49 100644 (file)
@@ -15,6 +15,14 @@ from teuthology.orchestra.run import CommandFailedError
 log = logging.getLogger(__name__)
 
 
+def long_running(f):
+    """
+    Decorator that adds an "is_long_running" attribute to the wrapped function
+    """
+    f.is_long_running = True
+    return f
+
+
 class CephFSTestCase(unittest.TestCase):
     """
     Test case for Ceph FS, requires caller to populate Filesystem and Mounts,