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

More reliable shutdown of the EnsoContext to save resources #6468

Merged
merged 9 commits into from
May 2, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ class RuntimeServerTest
val Some(Api.Response(_, Api.InitializedNotification())) = context.receive
}

override protected def afterEach(): Unit = {
context.executionContext.context.close()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helps the "engine threads", but the test should also stop Akka, @4e6. Dmitry, if you know how to do that feel free to directly commit to this branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not using Akka in runtime* projects. Only in the language-server and project-manager

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong, in fact, runtime tests are using Akka.

}

"RuntimeServer" should "push and pop functions on the stack" in {
val contents = context.Main.code
val mainFile = context.writeMain(contents)
Expand Down