The reason rails_restart_test.go has been racey is because the code
under test is actually buggy. If the configuration reload loop ever
encounters a condition where it wants to restart (probably
`hash == hash_lastload`), it tries to call a nonexistent method
`continue`, the thread crashes, the configuration never gets reloaded,
and the test fails.
Use the intended Ruby keyword `next` instead.
Closes #20137.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
rescue => e
Rails.logger.info("reload_config: config file updated but could not be loaded: #{e}")
t_lastload = t
- continue
+ next
end
if hash == hash_lastload
# If we reloaded a new or updated file, but the content is
# identical, keep polling instead of restarting.
t_lastload = t
- continue
+ next
end
restartfile = Rails.root.join('tmp', 'restart.txt')