You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Verify that we can yellow flash causes all groups to go to state 'c'
#
# 1. Given the site is connected
# 2. Send the control command to switch to Yellow flash
# 3. Wait for all groups to go to group 'c'
# 4. Send command to switch to normal control
# 5. Wait for all groups to switch do something else that 'c'
specify 'yellow flash affects all signal groups', sxl: '>=1.0.7' do |example|
Validator::Site.connected do |task,supervisor,site|
prepare task, site
timeout = 10
switch_yellow_flash
wait_for_groups 'c', timeout: timeout # c mean s yellow flash
switch_normal_control
wait_for_groups '[^c]', timeout: timeout # not c, ie. not yellow flash
end
end
This timeout of 10 seconds should be configurable in the config file. The timeout is also hardcoded in the "wait_for_groups" function, even though it is passed as a parameter.
def wait_for_groups state, timeout:
timeout = 10
regex = /^#{state}+$/
wait_for_status(@task,
"Wait for all groups to go to yellow flash",
[{'sCI'=>'S0001','n'=>'signalgroupstatus','s'=>regex}],
update_rate: 0,
timeout: timeout
)
end
The text was updated successfully, but these errors were encountered:
This timeout of 10 seconds should be configurable in the config file. The timeout is also hardcoded in the "wait_for_groups" function, even though it is passed as a parameter.
The text was updated successfully, but these errors were encountered: