Skip to content

Test suite: ignore exception if LAN web server is kill():ed before we wait()

anonym requested to merge properly-kill-test-suite-lan-web-server into stable

I have seen this (1st jenkins run of 19897-onion-grater-handle-unattached-streams):

    Scenario: The Tor Browser cannot access the LAN
  [...]
      And no traffic was sent to the web server on the LAN (passed)
  [...]
        No child processes (Errno::ECHILD)
        ./features/step_definitions/common_steps.rb:1215:in `wait'
        ./features/step_definitions/common_steps.rb:1215:in `block in start_web_server'
        ./features/support/hooks.rb:76:in `each'
        ./features/support/hooks.rb:76:in `After'

What happened was that once we tried to wait for the process to die it had already been killed!

Another fix would be to simply remove the wait() call, but it was added in commit b4305d90 to "prevent webtrick from becoming a zombie process". We are not using webtrick any more, but perhaps the same thing can happen now as well? At the very least it seems good that the after_scenario hook will block until the web server is down, so there is no possibility of a race in case the next scenario wants to start the web server.

Edited by anonym

Merge request reports