~corey.bryant/charms/trusty/keystone/python-six

« back to all changes in this revision

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

  • Committer: Liam Young
  • Date: 2014-07-21 09:49:40 UTC
  • mfrom: (68.1.6 keystone)
  • Revision ID: liam.young@canonical.com-20140721094940-ffsywsa04ocxqhfa
[corey.bryant,r=gnuoy] Sleep for 10 seconds before checking if keystone-all has restarted. Sync with charm-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):
 
142
                          pgrep_full=False, sleep_time=20):
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(10)
 
146
        sleep(sleep_time)
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