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

"Generation is already running" warning when a different project opened #390

Closed
Vladislav0Art opened this issue Oct 11, 2024 · 3 comments · Fixed by #393
Closed

"Generation is already running" warning when a different project opened #390

Vladislav0Art opened this issue Oct 11, 2024 · 3 comments · Fixed by #393
Assignees
Labels
bug Something isn't working Urgent Urgant PR

Comments

@Vladislav0Art
Copy link
Collaborator

Describe the bug
I ran TestSpark on a project A and received a test suite in the sidebar (I did not delete the sidebar). I closed the current project via pressing 'X' button on a mac window (notice that I did not close the IDE but a project within the same IDE instance!). I opened a different project and received the following warning:

Screenshot 2024-10-11 at 16 28 26

This warning neither allows me to execute any subsequent generations nor does it terminate the previous generation if I click "Terminate". It is sort of soft deadlock. I can only re-open the IDE to fix this.

To Reproduce
Steps to reproduce the behavior:

  1. Open a project A;
  2. Generate tests and do not close the sidebar (idk whether it matters);
  3. Close the project A;
  4. Open a project B (A != B);
  5. Attempt to generate tests in project B -> warning occurred -> try to terminate -> no-op -> soft deadlock.

Expected behavior
No soft deadlocks.

@Vladislav0Art Vladislav0Art added bug Something isn't working Urgent Urgant PR labels Oct 11, 2024
@pderakhshanfar
Copy link
Collaborator

pderakhshanfar commented Oct 11, 2024

The terminate button basically does nothing:
image
We just have a boolean value and we never keep track of the process. Se. we can either make the isRunning flag false again or perform a major refactoring how termination and process monitoring work

@Vladislav0Art
Copy link
Collaborator Author

perform a major refactoring how termination and process monitoring work

I recommend trying to find a suitable solution that is least workload-demanding so as not to delay the release and create an issue for a major refactor "sometime later" after the release.

@pderakhshanfar what do you think?

@pderakhshanfar
Copy link
Collaborator

@Vladislav0Art I think I found an "acceptable" solution without major refactoring. In summary, with the more advanced indicator management that we have developed when extracting core module, can be very helpful here. So, we can actually check the indicator in the TestGenerationController instead of isRunning flag. Also, terminate can trigger the cancel() method from the indicator. I have made a PR here with this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Urgent Urgant PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants