~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/tests/integrated/test_servers.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import time
19
19
import unittest
20
20
 
21
 
import nova.virt.fake
22
21
from nova.log import logging
 
22
from nova.tests.integrated.api import client
23
23
from nova.tests.integrated import integrated_helpers
24
 
from nova.tests.integrated.api import client
 
24
import nova.virt.fake
25
25
 
26
26
 
27
27
LOG = logging.getLogger(__name__)
38
38
 
39
39
        return server
40
40
 
41
 
    def _restart_compute_service(self, periodic_interval=None):
 
41
    def _restart_compute_service(self, *args, **kwargs):
42
42
        """restart compute service. NOTE: fake driver forgets all instances."""
43
43
        self.compute.kill()
44
 
        if periodic_interval:
45
 
            self.compute = self.start_service(
46
 
                'compute', periodic_interval=periodic_interval)
47
 
        else:
48
 
            self.compute = self.start_service('compute')
 
44
        self.compute = self.start_service('compute', *args, **kwargs)
49
45
 
50
46
    def test_get_servers(self):
51
47
        """Simple check that listing servers works."""
144
140
        self.flags(stub_network=True, reclaim_instance_interval=1)
145
141
 
146
142
        # enforce periodic tasks run in short time to avoid wait for 60s.
147
 
        self._restart_compute_service(periodic_interval=0.3)
 
143
        self._restart_compute_service(
 
144
                periodic_interval=0.3, periodic_fuzzy_delay=0)
148
145
 
149
146
        # Create server
150
147
        server = self._build_minimal_create_server_request()