~openstack-charmers/charms/trusty/quantum-gateway/old-1410

« back to all changes in this revision

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

  • Committer: james.page at ubuntu
  • Date: 2014-07-28 11:33:12 UTC
  • Revision ID: james.page@ubuntu.com-20140728113312-nzew0x1rn4ogh1g9
Resync helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        return self._get_dir_mtime(sentry_unit, proc_dir)
140
140
 
141
141
    def service_restarted(self, sentry_unit, service, filename,
142
 
                          pgrep_full=False, sleep_time=20):
 
142
                          pgrep_full=False):
143
143
        """Compare a service's start time vs a file's last modification time
144
144
           (such as a config file for that service) to determine if the service
145
145
           has been restarted."""
146
 
        sleep(sleep_time)
 
146
        sleep(10)
147
147
        if self._get_proc_start_time(sentry_unit, service, pgrep_full) >= \
148
148
           self._get_file_mtime(sentry_unit, filename):
149
149
            return True