murex / TCR

TCR (Test && Commit || Revert) utility
MIT License
43 stars 4 forks source link

[Bug]: TCR Freezing when python code gets into an infinite loop #694

Open philou opened 2 weeks ago

philou commented 2 weeks ago

Contact Details

No response

Describe the bug

Whenever the python code gets into an infinite loop in the test, TCR stays there and we have no choice but to kill and restart it.

To Reproduce

Steps to reproduce the behavior:

  1. Use the python example
  2. Start TCR
  3. add an infinite while loop in a test
  4. Save and see TCR freezing

Expected behavior

I would expect that TCR would kill the tests after a timeout period

Working Environment

  1. OS: windows
  2. Version [e.g. 1.0.0]

Additional Context

Additional information

Code of Conduct

mengdaming commented 2 weeks ago

I'm assuming this is not python-specific, as same behaviour should occur with any toolchain as long as the build or the test commands enter an infinite loop (TCR is currently assuming that these commands will eventually come to an end).

The concern I'm having with using a timeout is that this depends on many factors (speed of the machine running TCR, size of the code to be built, number of tests, speed of tests, etc.). Another option could be to provide users with an "abort" shortcut, that would allow them to interrupt a TCR cycle if they observe that it's taking too long. WDYT?

mengdaming commented 3 days ago

I confirm that this behaviour can be observed with any language/toolchain as soon as there is an infinite loop somewhere while the tests are running