You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When pynguin generates test cases for a program that may occur an infinite loop, pynguin takes long time (even when specifying timeout options).
To Reproduce
Create loop.py with the following content:
deffunc(n: int):
whilen==0:
passreturnn
Run pynguin with the following command: PYNGUIN_DANGER_AWARE=1 pynguin --project-path . --output-path output --module-name loop --maximum-search-time 1 --maximum-slicing-time 1 --maximum-test-execution-timeout 1 --maximum-test-execution-timeout 1 --test-execution-time-per-statement 1 --max-size 1 --max-length-test-case 1 --max-int 10 --assertion_generation SIMPLE --algorithm MOSA
pynguin takes about 30 seconds
Expected behavior
I can imagine there are various mandatory processes where it is difficult to limit execution times, but, I'd like pynguin stop until 5 seconds when specifying the above options.
Screenshots
Software Version:
OS: macOS
Python: 3.10.9
Poetry: 1.4.0
Pynguin: 0.33.0
The text was updated successfully, but these errors were encountered:
exKAZUu
changed the title
pynguin takes too long time even when specifying timeout options
pynguin takes long time even when specifying timeout options
Jul 11, 2023
Thank you for your interest in Pynguin and reporting this bug. I agree that this is definitely a bug and a behaviour that should be fixed. The problem seems to be in the execution, where one of the generated inputs triggers an infinite loop. The thread used for execution is then killed, which causes the RuntimeError.
Unfortunately, I am very busy with other things, thus I cannot promise when I can work on a fix for this. I'll keep this bug open and refer to it whenever I find the time.
Describe the bug
When pynguin generates test cases for a program that may occur an infinite loop, pynguin takes long time (even when specifying timeout options).
To Reproduce
loop.py
with the following content:PYNGUIN_DANGER_AWARE=1 pynguin --project-path . --output-path output --module-name loop --maximum-search-time 1 --maximum-slicing-time 1 --maximum-test-execution-timeout 1 --maximum-test-execution-timeout 1 --test-execution-time-per-statement 1 --max-size 1 --max-length-test-case 1 --max-int 10 --assertion_generation SIMPLE --algorithm MOSA
Expected behavior
I can imagine there are various mandatory processes where it is difficult to limit execution times, but, I'd like pynguin stop until 5 seconds when specifying the above options.
Screenshots
Software Version:
The text was updated successfully, but these errors were encountered: