LivelyKernel / LivelyKernel/lively.next

Server restart inside of `test.sh` does not work as expected

Open
#1,526 0 comments 0 reactions 1 assignee View on GitHub

@linusha is already working on this.

Since May 16, 2024.

:lady_beetle: bug
Dominant language
JavaScript
Stars
90
Forks
20
PR merge metrics
No merged PRs in 30d

Description

There are several problems with the way we handle server restarts in the test.sh script:

  • In the case that the CI env variable is not set, the server is not correctly shutdown.
  • In the case that the CI env variable is set, the server is not correctly shutdown when running the script locally. It is unclear why that works remotely, as starting a server locally after running the script does not succeed due to the port already being used.
  • I could reliably kill everything by invoking pkill -9 -f '.*lively.*' inside of the same shell that the script ran it previously. However, using the same line inside of the script did not always lead to the same result. I expect that this has something to do with subshells and the UNIX process hierarchy.
  • There is however an additional catch: The above command will not work as expected for the case that one starts the a new test server (running test.sh without the CI env variable set while another lively server is running on a port other than 9011), as this kills all lively servers. However, we need a command that only kills the one on 9011 and -n does not cut it, as we need to kill multiple processes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.