~openstack-charmers/charms/trusty/cinder-backup/trunk

« back to all changes in this revision

Viewing changes to tests/charmhelpers/contrib/amulet/deployment.py

  • Committer: Liam Young
  • Date: 2016-07-21 14:18:29 UTC
  • Revision ID: liam.young@canonical.com-20160721141829-wi3tmmcn173crrcm
Pre 1607 release charm-helpers sync

Sync charmhelpers to pick up bug fixes for 1607 release

Change-Id: I2ce83db365191382708d53b8ee4c5fbb209dbfa4

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
 
79
79
    def _deploy(self):
80
80
        """Deploy environment and wait for all hooks to finish executing."""
 
81
        timeout = int(os.environ.get('AMULET_SETUP_TIMEOUT', 900))
81
82
        try:
82
 
            self.d.setup(timeout=900)
83
 
            self.d.sentry.wait(timeout=900)
 
83
            self.d.setup(timeout=timeout)
 
84
            self.d.sentry.wait(timeout=timeout)
84
85
        except amulet.helpers.TimeoutError:
85
 
            amulet.raise_status(amulet.FAIL, msg="Deployment timed out")
 
86
            amulet.raise_status(
 
87
                amulet.FAIL,
 
88
                msg="Deployment timed out ({}s)".format(timeout)
 
89
            )
86
90
        except Exception:
87
91
            raise
88
92