diff options
| author | Soren Hansen <soren.hansen@rackspace.com> | 2010-10-15 20:23:59 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-10-15 20:23:59 +0000 |
| commit | d4d8a530036d1530ba5420fb3831bc0705a604e8 (patch) | |
| tree | c35cdc762faeede856ddc1678d344408393fb84d /nova | |
| parent | b70742cd442e8477d15c82a825641d934529bedf (diff) | |
| parent | a2eec045eec52032ae8a3250120229039529ec53 (diff) | |
Fix some unit tests:
* One is a race due to the polling nature of rpc in eventlet based unit tests.
* The other is a more real problem. It was caused by datastore.py being removed. It wasn't caught earlier because the .pyc file was still around on the tarmac box.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/cloud_unittest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/tests/cloud_unittest.py b/nova/tests/cloud_unittest.py index 20099069c..835bfdf49 100644 --- a/nova/tests/cloud_unittest.py +++ b/nova/tests/cloud_unittest.py @@ -26,6 +26,7 @@ import StringIO import tempfile import time +from eventlet import greenthread from twisted.internet import defer import unittest from xml.etree import ElementTree @@ -101,6 +102,9 @@ class CloudTestCase(test.TrialTestCase): instance_id = rv['instancesSet'][0]['instanceId'] output = yield self.cloud.get_console_output(context=self.context, instance_id=[instance_id]) self.assertEquals(b64decode(output['output']), 'FAKE CONSOLE OUTPUT') + # TODO(soren): We need this until we can stop polling in the rpc code + # for unit tests. + greenthread.sleep(0.3) rv = yield self.cloud.terminate_instances(self.context, [instance_id]) |
