Skip to content

Commit e0b3993

Browse files
authored
Merge pull request #295 from NeillM/uon
Allow the Behat timeout factor to be configured
2 parents fa8f9c4 + 90c0288 commit e0b3993

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ When you change them, use `bin/moodle-docker-compose down && bin/moodle-docker-c
228228
| `MOODLE_DOCKER_SELENIUM_VNC_PORT` | no | any integer value (or bind_ip:integer)| not set | If set, the selenium node will expose a vnc session on the port specified. Similar to MOODLE_DOCKER_WEB_PORT, you can optionally define the host IP to bind to. If you just set the port, VNC binds to 127.0.0.1 |
229229
| `MOODLE_DOCKER_APP_PATH` | no | path on your file system | not set | If set and the chrome browser is selected, it will start an instance of the Moodle app from your local codebase |
230230
| `MOODLE_DOCKER_APP_VERSION` | no | a valid [app docker image version](https://docs.moodle.org/dev/Moodle_App_Docker_images) | not set | If set will start an instance of the Moodle app if the chrome browser is selected |
231+
| `MOODLE_DOCKER_TIMEOUT_FACTOR` | no | any integer value | 1 | If set the timeouts in behat will be multiplied by the factor |
231232

232233
In addition to that, `MOODLE_DOCKER_RUNNING=1` env variable is defined and available
233234
in the webserver container to flag being run by `moodle-docker`. Developer

base.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
MOODLE_DOCKER_DBPASS: "m@0dl3ing"
1414
MOODLE_DOCKER_BROWSER: firefox
1515
MOODLE_DOCKER_WEB_HOST: "${MOODLE_DOCKER_WEB_HOST}"
16+
MOODLE_DOCKER_TIMEOUT_FACTOR: "${MOODLE_DOCKER_TIMEOUT_FACTOR}"
1617
exttests:
1718
image: moodlehq/moodle-exttests
1819
volumes:

bin/moodle-docker-compose

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ then
229229
dockercompose="${dockercompose} -f ${basedir}/webserver.port.yml"
230230
fi
231231

232+
# Behat test timeout factor
233+
export MOODLE_DOCKER_TIMEOUT_FACTOR=${MOODLE_DOCKER_TIMEOUT_FACTOR:-1}
232234

233235
# Mac OS Compatbility
234236
if [[ "$(uname)" == "Darwin" ]]; then

bin/moodle-docker-compose.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ IF "%MOODLE_DOCKER_SELENIUM_VNC_PORT%"=="" (
185185
)
186186
)
187187

188+
IF "%MOODLE_DOCKER_TIMEOUT_FACTOR%"=="" (
189+
SET MOODLE_DOCKER_TIMEOUT_FACTOR=1
190+
)
188191

189192
REM Apply local customisations if a local.yml is found.
190193
REM Note: This must be the final modification before the docker-compose command is called.

config.docker-template.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
),
8181
);
8282
$CFG->behat_faildump_path = '/var/www/behatfaildumps';
83+
$CFG->behat_increasetimeout = getenv('MOODLE_DOCKER_TIMEOUT_FACTOR');
8384

8485
define('PHPUNIT_LONGTEST', true);
8586

0 commit comments

Comments
 (0)