Adam Litke has uploaded a new change for review.

Change subject: tests: TestCopyDataDIV needs to initialize the jobs module
......................................................................

tests: TestCopyDataDIV needs to initialize the jobs module

The copy_data job now relies on the jobs module being properly
initialized with a running Scheduler (for autodelete).  Add setUp and
tearDown methods to the tests to properly manage this.

Change-Id: I44a7e15f2eeee8aefa9a2470f940237dc5b4469d
Signed-off-by: Adam Litke <ali...@redhat.com>
---
M tests/storage_sdm_copy_data_test.py
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/64228/1

diff --git a/tests/storage_sdm_copy_data_test.py 
b/tests/storage_sdm_copy_data_test.py
index a408248..6d7342b 100644
--- a/tests/storage_sdm_copy_data_test.py
+++ b/tests/storage_sdm_copy_data_test.py
@@ -32,6 +32,7 @@
 
 from vdsm import jobs
 from vdsm import qemuimg
+from vdsm import schedule
 from vdsm.storage import constants as sc
 from vdsm.storage import guarded
 
@@ -61,6 +62,14 @@
 class TestCopyDataDIV(VdsmTestCase):
     SIZE = 1048576
 
+    def setUp(self):
+        self.scheduler = schedule.Scheduler()
+        self.scheduler.start()
+        jobs.start(self.scheduler)
+
+    def tearDown(self):
+        jobs._clear()
+
     @contextmanager
     def get_vols(self, storage_type, src_fmt, dst_fmt, chain_length=1):
         with fake_env(storage_type) as env:


-- 
To view, visit https://gerrit.ovirt.org/64228
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44a7e15f2eeee8aefa9a2470f940237dc5b4469d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to