Change in vdsm[master]: tests: TestCopyDataDIV needs to initialize the jobs module

2016-09-21 Thread alitke
Adam Litke has posted comments on this change.

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


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/64228/1/tests/storage_sdm_copy_data_test.py
File tests/storage_sdm_copy_data_test.py:

Line 64: 
Line 65: def setUp(self):
Line 66: self.scheduler = schedule.Scheduler()
Line 67: self.scheduler.start()
Line 68: jobs.start(self.scheduler)
> Why do we need a real scheduler? a fake scheduler should be good enough, we
That should be fine actually.  I'll just have to move FakeScheduler to a module 
where it can be shared.
Line 69: 
Line 70: def tearDown(self):
Line 71: jobs._clear()
Line 72: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44a7e15f28aefa9a2470f940237dc5b4469d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: TestCopyDataDIV needs to initialize the jobs module

2016-09-20 Thread nsoffer
Nir Soffer has posted comments on this change.

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


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/64228/1/tests/storage_sdm_copy_data_test.py
File tests/storage_sdm_copy_data_test.py:

Line 64: 
Line 65: def setUp(self):
Line 66: self.scheduler = schedule.Scheduler()
Line 67: self.scheduler.start()
Line 68: jobs.start(self.scheduler)
Why do we need a real scheduler? a fake scheduler should be good enough, we 
already clear all jobs during teardown.
Line 69: 
Line 70: def tearDown(self):
Line 71: jobs._clear()
Line 72: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44a7e15f28aefa9a2470f940237dc5b4469d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: TestCopyDataDIV needs to initialize the jobs module

2016-09-20 Thread automation
gerrit-hooks has posted comments on this change.

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


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44a7e15f28aefa9a2470f940237dc5b4469d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: TestCopyDataDIV needs to initialize the jobs module

2016-09-20 Thread alitke
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: I44a7e15f28aefa9a2470f940237dc5b4469d
Signed-off-by: Adam Litke 
---
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: I44a7e15f28aefa9a2470f940237dc5b4469d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org