dask: Test interrupt fails intermittently

We’re seeing this error pop up from time to time on travis.ci. cc @jcrist

________________________________ test_interrupt ________________________________
[gw0] linux -- Python 3.5.3 /home/travis/miniconda/envs/test-environment/bin/python
@pytest.mark.slow
    def test_interrupt():
        try:
            proc = subprocess.Popen([sys.executable, '-c', code],
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE)
            # Wait for scheduler to start
            msg = proc.stdout.readline()
            if msg != 'started\n' and proc.poll() is not None:
                assert False, "subprocess failed"
            # Scheduler has started, send an interrupt
            sigint = signal.CTRL_C_EVENT if os.name == 'nt' else signal.SIGINT
            try:
                proc.send_signal(sigint)
                # Wait a bit for it to die
                start = time()
                while time() - start < 2.0:
                    if proc.poll() is not None:
                        break
                    sleep(0.05)
                else:
>                   assert False, "KeyboardInterrupt Failed"
E                   AssertionError: KeyboardInterrupt Failed
E                   assert False
dask/tests/test_threaded.py:155: AssertionError

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Thanks for following up here @GenevieveBuckley. FWIW test_interrupt is still a flaky test, though probably for a different reason than originally reported on this issue. I’ll wait until I see this failure pop up again in CI and open a new issue with an updated traceback