~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to nova/tests/test_xenapi.py

Removed test_parallel_builds in the XenAPI tests due to it frequently hanging indefinitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test suite for XenAPI."""
18
18
 
19
 
import eventlet
20
19
import functools
21
20
import json
22
21
import os
203
202
        self.context = context.RequestContext(self.user_id, self.project_id)
204
203
        self.conn = xenapi_conn.get_connection(False)
205
204
 
206
 
    def test_parallel_builds(self):
207
 
        stubs.stubout_loopingcall_delay(self.stubs)
208
 
 
209
 
        def _do_build(id, proj, user, *args):
210
 
            values = {
211
 
                'id': id,
212
 
                'project_id': proj,
213
 
                'user_id': user,
214
 
                'image_ref': 1,
215
 
                'kernel_id': 2,
216
 
                'ramdisk_id': 3,
217
 
                'instance_type_id': '3',  # m1.large
218
 
                'os_type': 'linux',
219
 
                'architecture': 'x86-64'}
220
 
            network_info = [({'bridge': 'fa0', 'id': 0, 'injected': False},
221
 
                              {'broadcast': '192.168.0.255',
222
 
                               'dns': ['192.168.0.1'],
223
 
                               'gateway': '192.168.0.1',
224
 
                               'gateway6': 'dead:beef::1',
225
 
                               'ip6s': [{'enabled': '1',
226
 
                                         'ip': 'dead:beef::dcad:beff:feef:0',
227
 
                                               'netmask': '64'}],
228
 
                               'ips': [{'enabled': '1',
229
 
                                        'ip': '192.168.0.100',
230
 
                                        'netmask': '255.255.255.0'}],
231
 
                               'label': 'fake',
232
 
                               'mac': 'DE:AD:BE:EF:00:00',
233
 
                               'rxtx_cap': 3})]
234
 
            instance = db.instance_create(self.context, values)
235
 
            self.conn.spawn(self.context, instance, network_info)
236
 
 
237
 
        gt1 = eventlet.spawn(_do_build, 1, self.project_id, self.user_id)
238
 
        gt2 = eventlet.spawn(_do_build, 2, self.project_id, self.user_id)
239
 
        gt1.wait()
240
 
        gt2.wait()
241
 
 
242
205
    def test_list_instances_0(self):
243
206
        instances = self.conn.list_instances()
244
207
        self.assertEquals(instances, [])