From 3e7c4d4bbca1eac1abc7c8ecac6f8563608d1481 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 22 Oct 2014 14:14:36 +0800 Subject: [PATCH] Increased default time to wait for Selenium to launch --- mdk/commands/behat.py | 4 +++- mdk/config-dist.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mdk/commands/behat.py b/mdk/commands/behat.py index e3a47a0..39dfa8c 100644 --- a/mdk/commands/behat.py +++ b/mdk/commands/behat.py @@ -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: diff --git a/mdk/config-dist.json b/mdk/config-dist.json index 792fd5c..e47f6c4 100644 --- a/mdk/config-dist.json +++ b/mdk/config-dist.json @@ -163,7 +163,9 @@ // 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 -- 2.11.0