JetBrains-Research / TestSpark

TestSpark - a plugin for generating unit tests. TestSpark natively integrates different AI-based test generation tools and techniques in the IDE. Started by SERG TU Delft. Currently under implementation by JetBrains Research (Software Testing Research) for research purposes.
MIT License
47 stars 13 forks source link

Remove `Thread.sleep` from `OpenAIRequestManager` #275

Closed Vladislav0Art closed 2 months ago

Vladislav0Art commented 3 months ago

Describe the bug The Thread.sleep is used within the OpenAIRequestManager.assembleLlmResponse; I understand that it is inserted to make the UI more appealing by having more time to show Generating test #i. The LLMs' response comes slowly on its own, therefore by having the artificial slow down we increase the waiting time (imagine, 50 milliseconds for 10 test cases => 500 milliseconds wasted), which degrades the user experience.

If Thread.sleep is removed there is still enough time for the indicator text to be visible on UI. I suggest removing the Thread.sleep from OpenAIRequestManager class.