Commit 4ad1de5a authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/seleniumserver: add slotQuantity instance parameter

`slotQuantity` set the number of slots by node meaning the maximum number of
session for a node.
parent 1f31fb9c
......@@ -15,8 +15,8 @@
[template]
filename = instance.cfg.in
md5sum = b443da6792bdde1218076a3a1ce50b11
md5sum = 58f6d112c90a23ae39f07a96fa5c8f1c
[template-selenium]
filename = instance-selenium.cfg.in
md5sum = 9bef75759623a660cfaf4b6f5a48a923
\ No newline at end of file
md5sum = 906abd81b5e7f2cf7a72883f5da126fe
......@@ -9,6 +9,12 @@
"description": "ssh public key",
"type": "string",
"default": ""
},
"slotQuantity": {
"title": "Slot quantity",
"description": "Number of slot per selenium node",
"type": "integer",
"default": 3
}
}
}
{% set parameter_dict = dict(default_parameter_dict, **parameter_dict) -%}
[buildout]
parts =
monitor-base
......@@ -54,7 +55,7 @@ command-line =
-host $${:hostname}
-port $${:port}
-role hub
-maxSession 20
-maxSession {{ parameter_dict['slotQuantity'] }}
-newSessionWaitTimeout 600000
--debug
......@@ -99,25 +100,25 @@ hostname = $${slap-configuration:ipv4-random}
[selenium-server-node-instance-firefox-102]
<= selenium-server-node-instance
capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX,version=${firefox-102:version},firefox_binary=${firefox-wrapper-102:location}
capabilities = browserName=firefox,maxInstances={{ parameter_dict['slotQuantity'] }},marionette=true,platform=LINUX,version=${firefox-102:version},firefox_binary=${firefox-wrapper-102:location}
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.33.0:location}
port = 7779
[selenium-server-node-instance-firefox-115]
<= selenium-server-node-instance
capabilities = browserName=firefox,maxInstances=3,marionette=true,platform=LINUX,version=${firefox-115:version},firefox_binary=${firefox-wrapper-115:location}
capabilities = browserName=firefox,maxInstances={{ parameter_dict['slotQuantity'] }},marionette=true,platform=LINUX,version=${firefox-115:version},firefox_binary=${firefox-wrapper-115:location}
java-args = -Dwebdriver.gecko.driver=${geckodriver-0.33.0:location}
port = 7780
[selenium-server-node-instance-chromium-91]
<= selenium-server-node-instance
capabilities = browserName=chrome,maxInstances=3,platform=LINUX,version=${chromium-91:version},chrome_binary=${chromium-wrapper-91:location}
capabilities = browserName=chrome,maxInstances={{ parameter_dict['slotQuantity'] }},platform=LINUX,version=${chromium-91:version},chrome_binary=${chromium-wrapper-91:location}
java-args = -Dwebdriver.chrome.driver=${chromedriver-wrapper-91:location}
port = 7781
[selenium-server-node-instance-chromium-120]
<= selenium-server-node-instance
capabilities = browserName=chrome,maxInstances=3,platform=LINUX,version=${chromium-120:version},chrome_binary=${chromium-wrapper-120:location}
capabilities = browserName=chrome,maxInstances={{ parameter_dict['slotQuantity'] }},platform=LINUX,version=${chromium-120:version},chrome_binary=${chromium-wrapper-120:location}
java-args = -Dwebdriver.chrome.driver=${chromedriver-wrapper-120:location}
port = 7782
......@@ -321,8 +322,8 @@ promise = check_command_execute
name = $${:_buildout_section_name_}.py
config-command =
$${selenium-server-check-nodes-registered:output} $${selenium-server-hub-instance:api-url} $${:expected-node-count}
# We have 4 nodes with 3 slots each
expected-node-count = 12
# We have 4 nodes with slotQuantity slots each
expected-node-count = {{ 4 * int(parameter_dict['slotQuantity']) }}
[selenium-server-check-nodes-registered]
recipe = slapos.recipe.template
......
......@@ -12,7 +12,13 @@ url = ${template-selenium:output}
output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-selenium.cfg
context =
jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration
key partition_ipv6 slap-configuration:ipv6-random
default-parameters =
{
"slotQuantity": 3
}
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment