Skip to content

Commit

Permalink
Add sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
hamiltonleemark committed Jan 8, 2017
1 parent bfe31a2 commit 734e5ad
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions examples/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
class Testsuite(unittest.TestCase):
""" Demonstrate each REST interface. """

def tearDown(self):
##
# This gives the daemon time to restart the VMs.
time.sleep(5 * 60)
##

def test_profile_list(self):
""" test_profile_list. """

Expand Down Expand Up @@ -64,6 +58,12 @@ def test_profile_acquire(self):
resp = requests.get(url)
resp.raise_for_status()

##
# This gives the daemon time to restart the VMs.
print "sleeping to allow daemon to rebuild VMs."
time.sleep(3 * 60)
##

def test_acquire_too_many(self):
""" test_acquire_too_many attempt to acquire too many VMs."""

Expand Down Expand Up @@ -91,6 +91,12 @@ def test_acquire_too_many(self):
resp = requests.get(url)
resp.raise_for_status()

##
# This gives the daemon time to restart the VMs.
print "sleeping to allow daemon to rebuild VMs."
time.sleep(7 * 60)
##

def test_acquire_renew(self):
""" test_acquire_renew renew an acquired VM. """

Expand Down

0 comments on commit 734e5ad

Please sign in to comment.