Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout Mechanism Not Working #285

Open
aetherealtech opened this issue Aug 6, 2023 · 2 comments
Open

Timeout Mechanism Not Working #285

aetherealtech opened this issue Aug 6, 2023 · 2 comments

Comments

@aetherealtech
Copy link

I'm running mutmut 2.4.3 pyhd8ed1ab_0 on Windows. Mutations that lead to infinite loops are freezing the run, seemingly indefinitely (certainly more than 10x the original test run time).

I know it is an infinite loop because I can see the edit being made to one of the source files while the stuck mutation is being tested, and I can avoid it by whitelisting the relevant lines with # pragma: no mutate.

The code is looping over an iterator:

iterator = iter(...)

while True:
  value = next(iterator, None)
  if value is None:
    break

The mutation changes the break to continue. As I understand it, the resulting infinite loop is supposed to trigger a timeout when the test runs more than 10x as long as the original unmutated test run. However that is not happening. As far as I can tell no timeout is triggering at all even after waiting 10 minutes (the original test run takes less a fraction of a second). I have to manually terminate the test run.

@boxed
Copy link
Owner

boxed commented Aug 6, 2023

There are some reports of similar issues yea. Maybe that it's on windows is a clue. If you manage to track it down I would welcome a PR.

@FlTr
Copy link
Contributor

FlTr commented Apr 4, 2024

Can confirm.
The test test_popen_streaming_output_timeout is failing on windows as well:

>       assert (time() - start) < 3
E       assert (1712241113.920155 - 1712241109.8610828) < 3
E        +  where 1712241113.920155 = time()

Maybe that narrows it down further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants