Browse code

Make screen sleep time configurable

the sleep 3 in screen_it was added to make devstack pass in the gate
with exceptionally slow test cloud nodes. In the gate we now bypass
the screen path entirely. However the sleep 3 remains and can add a
couple minutes delay into local development runs.

We're not sure yet how low this can safely be tuned, so step 1 is to
make it configurable, then get devstack team members to try various
options to see what works.

Change-Id: I0e6476176fc8589efc4e40e78c2231f704d14e45

Sean Dague authored on 2015/04/07 23:40:49
Showing 1 changed files
... ...
@@ -1256,8 +1256,13 @@ function screen_process {
1256 1256
 
1257 1257
     # sleep to allow bash to be ready to be send the command - we are
1258 1258
     # creating a new window in screen and then sends characters, so if
1259
-    # bash isn't running by the time we send the command, nothing happens
1260
-    sleep 3
1259
+    # bash isn't running by the time we send the command, nothing
1260
+    # happens.  This sleep was added originally to handle gate runs
1261
+    # where we needed this to be at least 3 seconds to pass
1262
+    # consistently on slow clouds. Now this is configurable so that we
1263
+    # can determine a reasonable value for the local case which should
1264
+    # be much smaller.
1265
+    sleep ${SCREEN_SLEEP:-3}
1261 1266
 
1262 1267
     NL=`echo -ne '\015'`
1263 1268
     # This fun command does the following: