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

Force stop: reset again+runner #213

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Conversation

rowo360
Copy link
Contributor

@rowo360 rowo360 commented Nov 17, 2024

This PR solves issue #1144 reported in the TestCentric GUI project.

When a forced stop is executed on a test run the entire agent process is getting terminated. We cannot use the identical agent or runner for the next test run, but instead we need to create new ones. However the member variables still references the outdated agent and continue trying to communicate with it.

The fix resets these two member variables so that the agent and runner are created newly with the next test run.

In addition also a small fix in the TestEventDispatcher class was required:
When a force stop is executed the _runCancelled variable is set to true. In this state no test events are fired anymore.
However there is no code location which reset this variable back to false, so as consequence the agent will not fire any events at all once force stop was executed.
I was not sure in which code location to add the reset of this variable best. But finally decided to place it into the method InitializeForRun. This means whenever a new test run starts, this variable is reset.

Overall the scenario mentioned in the issue will be fixed by this PR.

@CharliePoole
Copy link
Contributor

This looks like a good fix to me. This part of the engine code really has many flags that have to be checked and should eventually get refactored. But this needs to merge so you can build the GUI against it.

I'll add expand the title and add some info to the PR so that it generates a good entry for the readme file.

@CharliePoole CharliePoole added the Bug Something isn't working as expected. label Nov 17, 2024
@CharliePoole CharliePoole added this to the 2.0.0-beta7 milestone Nov 17, 2024
@CharliePoole CharliePoole merged commit 240c6f0 into TestCentric:main Nov 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants