Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit e4a900a

Browse files
committed
Minor chores
1 parent 6506a1c commit e4a900a

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Local
44
For pull requests or local commits:
55

6-
./test/before_install_build && ./test/install && ./test/script && docker tag selenium:latest elgalu/selenium:latest
6+
./test/before_install_build && ./test/install && ./test/script
77
docker exec grid versions && ./test/after_script
88
open ./images/grid_console.png #to verify the versions are correct
99
git checkout ./images/grid_console.png && open ./videos/chrome/test.mkv

docs/docker-compose.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Compose
2-
Scale up and down the nodes by using [docker-compose](https://docs.docker.com/compose/). Install the tooling by following that link.
2+
Scale up and down the nodes by using [docker-compose](https://docs.docker.com/compose/). Install the tooling by following that link and make sure you have latest stable versions of both tools, docker and docker-compose:
33

4-
docker-compose --version #=> version 1.7.1, build 0a9ab35
4+
docker --version #=> 1.11.2
5+
docker-compose --version #=> 1.7.1
56

67
## Usage
78
Either clone this repository or download the file [docker-compose.yml](../docker-compose.yml) using `wget`

test/compose-test.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ die () {
2323
[ -z "${SELENIUM_HUB_PORT}" ] && die "Required env var SELENIUM_HUB_PORT"
2424
[ -z "${WAIT_ALL_DONE}" ] && export WAIT_ALL_DONE="40s"
2525

26-
SLEEP_LOCALLY=0
27-
SLEEP_TRAVIS=3
28-
2926
# Ensure clean
3027
docker-compose -p selenium down || true
3128

@@ -35,8 +32,7 @@ docker-compose -p selenium scale hub=1 chrome=${NUM_NODES} firefox=${NUM_NODES}
3532
# FIXME: We still need to wait a bit because the nodes registration is not
3633
# being waited on wait_all_done script :(
3734
# mabe related to issue #83
38-
sleep ${SLEEP_LOCALLY}
39-
[ "${TRAVIS}" = "true" ] && sleep ${SLEEP_TRAVIS}
35+
sleep ${SLEEP_TIME}
4036

4137
# Wait then show errors, if any
4238
if ! docker exec selenium_hub_1 wait_all_done ${WAIT_ALL_DONE}; then
@@ -61,8 +57,7 @@ done
6157
# FIXME: We still need to wait a bit because the nodes registration is not
6258
# being waited on wait_all_done script :(
6359
# mabe related to issue #83
64-
sleep ${SLEEP_LOCALLY}
65-
[ "${TRAVIS}" = "true" ] && sleep ${SLEEP_TRAVIS}
60+
sleep ${SLEEP_TIME}
6661

6762
# Tests can run anywere, in the hub, in the host, doesn't matter
6863
for i in $(seq 1 ${PARAL_TESTS}); do
@@ -74,8 +69,7 @@ for i in $(seq 1 ${PARAL_TESTS}); do
7469
done
7570

7671
# sleep a moment to let the UI tests start
77-
sleep ${SLEEP_LOCALLY}
78-
[ "${TRAVIS}" = "true" ] && sleep ${SLEEP_TRAVIS}
72+
sleep ${SLEEP_TIME}
7973

8074
# not so verbose from here
8175
set +x

test/script_scenario_3

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@ set -xe
77
echo "#======================================================="
88
echo "# Scenario 3: Docker Compose 1 hub, 1 chrome, 1 firefox"
99
echo "#======================================================="
10-
export NUM_NODES=1 PARAL_TESTS=1 SELENIUM_HUB_PORT="4444"
10+
export SELENIUM_HUB_PORT="4444" NUM_NODES=1 PARAL_TESTS=1
11+
12+
if [ "${TRAVIS}" = "true" ]; then
13+
export SLEEP_TIME=7
14+
else
15+
# My local laptop has more power so hit it harder
16+
export SLEEP_TIME=0
17+
fi
18+
1119
./test/compose-test.sh

test/script_scenario_4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ echo "#======================================="
1010
export SELENIUM_HUB_PORT="4444"
1111

1212
if [ "${TRAVIS}" = "true" ]; then
13-
export NUM_NODES=2 PARAL_TESTS=2 WAIT_ALL_DONE="390s"
13+
export NUM_NODES=3 PARAL_TESTS=3 WAIT_ALL_DONE="390s" SLEEP_TIME=10
1414
else
1515
# My local laptop has more power so hit it harder
16-
export NUM_NODES=7 PARAL_TESTS=7 WAIT_ALL_DONE="90s"
16+
export NUM_NODES=7 PARAL_TESTS=7 WAIT_ALL_DONE="90s" SLEEP_TIME=3
1717
fi
1818

1919
./test/compose-test.sh

0 commit comments

Comments
 (0)