]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: rename 'long_running' decorator
authorRamana Raja <rraja@redhat.com>
Thu, 30 Jun 2016 08:26:35 +0000 (13:56 +0530)
committerJohn Spray <john.spray@redhat.com>
Thu, 30 Jun 2016 22:44:54 +0000 (23:44 +0100)
Rename 'long_running' decorator as 'for_teuthology',
which is more intuitive.

Signed-off-by: Ramana Raja <rraja@redhat.com>
tasks/cephfs/cephfs_test_case.py
tasks/cephfs/test_cap_flush.py
tasks/cephfs/test_damage.py
tasks/cephfs/test_data_scan.py
tasks/cephfs/test_journal_repair.py
tasks/cephfs/test_strays.py
tasks/cephfs/vstart_runner.py

index 73499da7ba99cdaa6cd785babe827b3b0abf709c..fb24fd6e22679113a5805246ea66a45067b60761 100644 (file)
@@ -16,11 +16,11 @@ from teuthology.orchestra.run import CommandFailedError
 log = logging.getLogger(__name__)
 
 
-def long_running(f):
+def for_teuthology(f):
     """
-    Decorator that adds an "is_long_running" attribute to the wrapped function
+    Decorator that adds an "is_for_teuthology" attribute to the wrapped function
     """
-    f.is_long_running = True
+    f.is_for_teuthology = True
     return f
 
 
index 1e5abb73212f0ec88e03cd9db4cfd3588cb3f9ce..1cd102f3aa693699d8d17c78fe9a2935be975608 100644 (file)
@@ -4,10 +4,10 @@ import time
 from textwrap import dedent
 from unittest import SkipTest
 from tasks.cephfs.fuse_mount import FuseMount
-from tasks.cephfs.cephfs_test_case import CephFSTestCase, long_running
+from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
 
 class TestCapFlush(CephFSTestCase):
-    @long_running
+    @for_teuthology
     def test_replay_create(self):
         """
         MDS starts to handle client caps when it enters clientreplay stage.
index 88a67e27e80194e06dddb3a4c501e98c2908a1fa..9c8d8ecbd5f09d2a049558e69b08177bbc21687b 100644 (file)
@@ -5,7 +5,7 @@ import re
 from teuthology.contextutil import MaxWhileTries
 from teuthology.exceptions import CommandFailedError
 from teuthology.orchestra.run import wait
-from tasks.cephfs.cephfs_test_case import CephFSTestCase, long_running
+from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
 
 DAMAGED_ON_START = "damaged_on_start"
 DAMAGED_ON_LS = "damaged_on_ls"
@@ -34,7 +34,7 @@ class TestDamage(CephFSTestCase):
         mds_map = self.fs.get_mds_map()
         return rank in mds_map['damaged']
 
-    @long_running #459s
+    @for_teuthology #459s
     def test_object_deletion(self):
         """
         That the MDS has a clean 'damaged' response to loss of any single metadata object
index 31bca16565563943d15a6cf865ca0a26457e81dd..134b567b916542d7a506cb469feecf61ad978dd8 100644 (file)
@@ -10,7 +10,7 @@ import traceback
 from collections import namedtuple
 
 from teuthology.orchestra.run import CommandFailedError
-from tasks.cephfs.cephfs_test_case import CephFSTestCase, long_running
+from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
 
 log = logging.getLogger(__name__)
 
@@ -506,6 +506,6 @@ class TestDataScan(CephFSTestCase):
         keys = self._dirfrag_keys(frag_obj_id)
         self.assertListEqual(sorted(keys), sorted(["%s_head" % f for f in file_names]))
 
-    @long_running
+    @for_teuthology
     def test_parallel_execution(self):
         self._rebuild_metadata(ManyFilesWorkload(self.fs, self.mount_a, 25), workers=7)
index 9ee4924720241bfb884cf01acf35e7f18f9f21eb..163d83acf06de2cf975e45d72f9e8dcfb705c8da 100644 (file)
@@ -10,7 +10,7 @@ import time
 
 from teuthology.orchestra.run import CommandFailedError
 from tasks.cephfs.filesystem import ObjectNotFound, ROOT_INO
-from tasks.cephfs.cephfs_test_case import CephFSTestCase, long_running
+from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
 from tasks.workunit import task as workunit
 
 log = logging.getLogger(__name__)
@@ -147,7 +147,7 @@ class TestJournalRepair(CephFSTestCase):
         # Check that we can do metadata ops in the recovered directory
         self.mount_a.run_shell(["touch", "subdir/subsubdir/subsubdirfile"])
 
-    @long_running # 308s
+    @for_teuthology # 308s
     def test_reset(self):
         """
         That after forcibly modifying the backing store, we can get back into
@@ -396,7 +396,7 @@ class TestJournalRepair(CephFSTestCase):
                    "result": 0}}
         )
 
-    @long_running  # Hack: "long running" because .sh doesn't work outside teuth
+    @for_teuthology  # Hack: "for_teuthology" because .sh doesn't work outside teuth
     def test_journal_smoke(self):
         workunit(self.ctx, {
             'clients': {
index 591d403de92ec91447ade347a768a20b168e39b3..ce55fc320f1ad9f096fe4952ea80395019a01d00 100644 (file)
@@ -4,7 +4,7 @@ import logging
 from textwrap import dedent
 import gevent
 from teuthology.orchestra.run import CommandFailedError
-from tasks.cephfs.cephfs_test_case import CephFSTestCase, long_running
+from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
 
 log = logging.getLogger(__name__)
 
@@ -18,11 +18,11 @@ class TestStrays(CephFSTestCase):
     # Range of different file sizes used in throttle test's workload
     throttle_workload_size_range = 16
 
-    @long_running
+    @for_teuthology
     def test_ops_throttle(self):
         self._test_throttling(self.OPS_THROTTLE)
 
-    @long_running
+    @for_teuthology
     def test_files_throttle(self):
         self._test_throttling(self.FILES_THROTTLE)
 
index 62c7e5486c0f4ce388d9fa62f3200b92b56b08d8..5a0581fd8e5b313e344f6c8b19367fcb71b2c6cc 100644 (file)
@@ -844,7 +844,7 @@ def exec_test():
 
         drop_test = False
 
-        if hasattr(fn, 'is_long_running') and getattr(fn, 'is_long_running') is True:
+        if hasattr(fn, 'is_for_teuthology') and getattr(fn, 'is_for_teuthology') is True:
             drop_test = True
             log.warn("Dropping test because long running: ".format(method.id()))
 
@@ -863,7 +863,7 @@ def exec_test():
             if not is_named:
                 victims.append((case, method))
 
-    log.info("Disabling {0} tests because of is_long_running or needs_trimming".format(len(victims)))
+    log.info("Disabling {0} tests because of is_for_teuthology or needs_trimming".format(len(victims)))
     for s, method in victims:
         s._tests.remove(method)