Change in vdsm[master]: tests: Move TestingJob to sdmtestlib

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

Change subject: tests: Move TestingJob to sdmtestlib
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: Move TestingJob to sdmtestlib

2016-09-15 Thread alitke
Adam Litke has abandoned this change.

Change subject: tests: Move TestingJob to sdmtestlib
..


Abandoned

Alternate solution merged.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: Move TestingJob to sdmtestlib

2016-07-25 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Move TestingJob to sdmtestlib
..


Patch Set 2:

* 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/61256
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: Move TestingJob to sdmtestlib

2016-07-22 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Move TestingJob to sdmtestlib
..


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/61256
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
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
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: Move TestingJob to sdmtestlib

2016-07-22 Thread alitke
Adam Litke has uploaded a new change for review.

Change subject: tests: Move TestingJob to sdmtestlib
..

tests: Move TestingJob to sdmtestlib

The TestingJob currently used in storage_sdm_api_test.py is needed for testing
Job handling in the hsm tests.  Move it to a common place where it can be
reused.

Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
Signed-off-by: Adam Litke 
---
M tests/sdmtestlib.py
M tests/storage_sdm_api_test.py
2 files changed, 21 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/61256/1

diff --git a/tests/sdmtestlib.py b/tests/sdmtestlib.py
index 8f95218..2844a6c 100644
--- a/tests/sdmtestlib.py
+++ b/tests/sdmtestlib.py
@@ -18,8 +18,28 @@
 #
 
 import time
+import uuid
+
+from vdsm import jobs
+from vdsm.storage.threadlocal import vars
+
+from storage.sdm.api import base
 
 
 def wait_for_job(job):
 while job.active:
 time.sleep(1)
+
+
+class TestingJob(base.Job):
+
+def __init__(self, exception=None):
+job_id = str(uuid.uuid4())
+super(TestingJob, self).__init__(job_id, 'testing_job', 'host_id')
+self.exception = exception
+
+def _run(self):
+assert(self.status == jobs.STATUS.RUNNING)
+assert(vars.job_id == self.id)
+if self.exception:
+raise self.exception
diff --git a/tests/storage_sdm_api_test.py b/tests/storage_sdm_api_test.py
index a5f00bc..3c4367e 100644
--- a/tests/storage_sdm_api_test.py
+++ b/tests/storage_sdm_api_test.py
@@ -18,16 +18,12 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
-import uuid
-
 from testlib import VdsmTestCase
-from sdmtestlib import wait_for_job
+from sdmtestlib import TestingJob, wait_for_job
 
 from vdsm import jobs
 from vdsm import exception
 from vdsm.storage.threadlocal import vars
-
-from storage.sdm.api import base
 
 
 class ApiBaseTests(VdsmTestCase):
@@ -63,17 +59,3 @@
 self.run_job(job)
 self.assertEqual(jobs.STATUS.FAILED, job.status)
 self.assertIsInstance(job.error, exception.VdsmException)
-
-
-class TestingJob(base.Job):
-
-def __init__(self, exception=None):
-job_id = str(uuid.uuid4())
-super(TestingJob, self).__init__(job_id, 'testing_job', 'host_id')
-self.exception = exception
-
-def _run(self):
-assert(self.status == jobs.STATUS.RUNNING)
-assert(vars.job_id == self.id)
-if self.exception:
-raise self.exception


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf4b1707f3e6a56918a52511f23e21ead1bd5adc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org