Patch travis timeout
@@ -60,6 +60,13 @@ def new_client_in_namespace(name_space, setup_bootstrap, cspec, num):
return client_info
+# this is a path for travis's 10m timeout limit
+# we reached the timeout because epochDuration happened to be greater than 10m
+def sleep_and_print(duration):
+ time.sleep(duration/2) # wait half
+ print("Half of duration passed") # print something for travis
+ time.sleep(duration/2) # wait second half
+
def test_add_delayed_nodes(init_session, setup_bootstrap, save_log_on_exit):
bs_info = setup_bootstrap.pods[0]
@@ -73,7 +80,7 @@ def test_add_delayed_nodes(init_session, setup_bootstrap, save_log_on_exit):
# start with 20 miners
startCount = 20
inf = new_client_in_namespace(ns, setup_bootstrap, cspec, startCount)
- time.sleep(epochDuration) # wait epoch duration
+ sleep_and_print(epochDuration) # wait epoch duration
# add 10 each epoch
numToAdd = 10
@@ -82,10 +89,12 @@ def test_add_delayed_nodes(init_session, setup_bootstrap, save_log_on_exit):
for i in range(0, count):
clients[i] = new_client_in_namespace(ns, setup_bootstrap, cspec, numToAdd)
print("Added client batch ", i, clients[i].pods[i]['name'])
- time.sleep(epochDuration)
+ sleep_and_print(epochDuration)
print("Done adding clients. Going to wait for two epochs")
- time.sleep(2*epochDuration) # wait two more epochs
+ # wait two more epochs
+ sleep_and_print(epochDuration)
+ sleep_and_print(epochDuration)
# total = bootstrap + first clients + added clients
total = 1 + startCount + count * numToAdd
