Increased default time to wait for Selenium to launch
authorFrederic Massart <fred@moodle.com>
Wed, 22 Oct 2014 06:14:36 +0000 (14:14 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 22 Oct 2014 06:14:36 +0000 (14:14 +0800)
mdk/commands/behat.py
mdk/config-dist.json

index e3a47a0..39dfa8c 100644 (file)
@@ -268,7 +268,9 @@ class BehatCommand(Command):
 
                 # Sleep for a few seconds before starting Behat
                 if phpServer or seleniumServer:
-                    sleep(3)
+                    launchSleep = int(self.C.get('behat.launchSleep'))
+                    logging.debug('Waiting for %d seconds to allow Selenium and/or the PHP Server to start ' % (launchSleep))
+                    sleep(launchSleep)
 
                 # Running the tests
                 try:
index 792fd5c..e47f6c4 100644 (file)
         // From 2.7 Behat requires a different wwwroot than the one set in config.php.
         // MDK assumes that the only thing that will differ between the wwwroot and
         // behat wwwroot is the host, nothing else. Use a ServerAlias or /etc/hosts entries.
-        "host": "127.0.0.1"
+        "host": "127.0.0.1",
+        // The number of seconds the behat command will sleep after launching the PHP Server, or Selenium.
+        "launchSleep": 5
     },
 
     // The name of the data directory