-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ensure new runs by deleting current runner instance when server calls stop function #200
Ensure new runs by deleting current runner instance when server calls stop function #200
Conversation
…er calls stop functio
@kraenhansen Can you take a look at it? The problem I encounter is that sometimes the window is closed while the tests are being executed, and after that,t I cannot start a new run. I tried to stop and start the server but without luck. The error that I got is A run is already in progress. |
Thanks for mention - I don't know why I missed this PR initially 👍 The fix looks reasonable. Ideally, I would like to add a failing test which gets solved by this fix, to avoid regressions 🤞 |
Yes, I’d be happy to implement that test. |
I fixed one more case where the client was disconnected while the tests were running. |
Thanks a lot for your suggestions! The failing test in the CLI package had to do with the runner emitting an "end" event before a "start" event, this required quite a bit of refactoring in the resetting code. I've also refactored the tests you added to use a single client written in TS - please have a look at my changes and add any comments you might have. If you approve, the tests are now passing and we can get this merged and released 👍 (thanks again for your contribution and patience on this). |
Thanks for refactoring the tests to use a single TS client! I’ve reviewed your changes and everything looks good to me. I'm approving the PR—please go ahead and merge and release it. |
This pull request includes a small change to the
Server
class in thepackages/server/src/Server.ts
file. The change ensures that therunner
is deleted when the server is closed to allow another run.packages/server/src/Server.ts
: Added a line to delete therunner
property in theclose
method to ensure the server can be run again.