Skip to content

CI Testing for Ctrl+C interrupt #58849

@fonsp

Description

@fonsp

Hi!

From the Julia IDE perspective, I would really like to see interrupt testing in Julia CI to make Ctrl+C more reliable. Interrupt is a crucial feature for an interactive programming language. If interrupt works reliably, (new) users will feel much more comfortable running and trying code, which speeds up the developer process. I believe that improving Julia's interrupt experience is a sure way to make Julia more accessible and appreciated.

For example, a recent change broke interrupting sleep and HTTP web servers (issue 1 issue 2).

What to test

In my experience, the different areas that are important to test are:

  • Interrupt sleep(10)
  • Interrupt heavy math like this snippet
  • Repeated interrupts: running code, interrupting, and repeating this multiple times.
  • Catching an interrupt with try as an InterruptException
  • Interrupt a tight loop like while true; end by "Force throwing SIGINT" – pressing Ctrl+C five times within one second.
  • Interrupting a Julia subprocess (e.g. with Distributed or Malt). For example, Distributed.interrupt on Windows should not kill the process.

Malt tests

Malt.jl also has many interrupt tests (testing both Distributed and Malt), and one reason for splitting this out of Pluto.jl was to get reliable coverage from PkgEval. Running Malt tests on new versions of Julia is a good way to test interrupt reliability. So it was frustrating for me to see that PkgEval was not used in #57544 which would have caught this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error handlingHandling of exceptions by Julia or the usertestThis change adds or pertains to unit tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions