~aisrael/charms/trusty/ubuntu-repository-cache/fix-test

« back to all changes in this revision

Viewing changes to tests/110-multi_unit.simple

  • Committer: Robert Jennings
  • Date: 2015-05-02 00:22:24 UTC
  • Revision ID: robert.jennings@canonical.com-20150502002224-j7edpdofp927p5c9
Tests: Correct logging text and alter timeout

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
# Wait for leader to rsync from archive
101
101
path = '/srv/ubuntu-repository-cache/apache/data/ubuntu_active/dists'
102
 
wait_for_path(leader, path, RSYNC_TIMEOUT, 'Leader not serving metadata')
 
102
wait_for_path(leader, path, RSYNC_TIMEOUT, 'Leader does not have metadata')
103
103
log('INFO: Leader has metadata')
104
 
time.sleep(30)
 
104
time.sleep(240)
105
105
 
106
106
# Test that the leader is now serving metadata
107
107
url = 'http://{}'.format(leader.info['public-address'])
117
117
# Wait for non-leader peer to rsync from the leader
118
118
peer = d.sentry.unit[SERVICE + '/1']
119
119
path = '/srv/ubuntu-repository-cache/apache/data/ubuntu_active/dists'
120
 
wait_for_path(peer, path, RSYNC_TIMEOUT, 'Leader not serving metadata')
121
 
log('INFO: Non-leader has metadata')
 
120
wait_for_path(peer, path, RSYNC_TIMEOUT, 'Peer does not have metadata')
 
121
log('INFO: Peer has metadata')
122
122
time.sleep(30)
123
123
 
124
124
url = 'http://{}'.format(peer.info['public-address'])
143
143
except IOError:
144
144
    pass
145
145
else:
146
 
    amulet.raise_status(amulet.FAIL, msg='Non-leader has rsync cron job')
147
 
log('PASS: Non-leader does not have the rsync cron job')
 
146
    amulet.raise_status(amulet.FAIL, msg='Peer has rsync cron job')
 
147
log('PASS: Peer does not have the rsync cron job')