Revision 36bebc53 test/py/ganeti.hypervisor.hv_xen_unittest.py
b/test/py/ganeti.hypervisor.hv_xen_unittest.py | ||
---|---|---|
159 | 159 |
self.fail("Exception was not raised") |
160 | 160 |
|
161 | 161 |
|
162 |
class TestGetXmList(testutils.GanetiTestCase):
|
|
162 |
class TestGetInstanceList(testutils.GanetiTestCase):
|
|
163 | 163 |
def _Fail(self): |
164 | 164 |
return utils.RunResult(constants.EXIT_FAILURE, None, |
165 | 165 |
"stdout", "stderr", None, |
... | ... | |
168 | 168 |
def testTimeout(self): |
169 | 169 |
fn = testutils.CallCounter(self._Fail) |
170 | 170 |
try: |
171 |
hv_xen._GetXmList(fn, False, _timeout=0.1)
|
|
171 |
hv_xen._GetInstanceList(fn, False, _timeout=0.1)
|
|
172 | 172 |
except errors.HypervisorError, err: |
173 | 173 |
self.assertTrue("timeout exceeded" in str(err)) |
174 | 174 |
else: |
... | ... | |
186 | 186 |
|
187 | 187 |
fn = testutils.CallCounter(compat.partial(self._Success, data)) |
188 | 188 |
|
189 |
result = hv_xen._GetXmList(fn, True, _timeout=0.1)
|
|
189 |
result = hv_xen._GetInstanceList(fn, True, _timeout=0.1)
|
|
190 | 190 |
|
191 | 191 |
self.assertEqual(len(result), 4) |
192 | 192 |
|
Also available in: Unified diff