Fix race condition in runtime tests

This commit is contained in:
Jonatan Kłosko 2021-07-07 10:44:13 +02:00
parent 8825e8838b
commit 0ad551609c
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ defmodule Livebook.Runtime.ErlDist.NodeManagerTest do
test "terminates when the last runtime server terminates" do
{:ok, manager_pid} =
NodeManager.start_link(unload_modules_on_termination: false, anonymous: true)
start_supervised({NodeManager, [unload_modules_on_termination: false, anonymous: true]})
server1 = NodeManager.start_runtime_server(manager_pid)
server2 = NodeManager.start_runtime_server(manager_pid)

View file

@ -5,7 +5,7 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServerTest do
setup do
{:ok, manager_pid} =
NodeManager.start_link(unload_modules_on_termination: false, anonymous: true)
start_supervised({NodeManager, [unload_modules_on_termination: false, anonymous: true]})
runtime_server_pid = NodeManager.start_runtime_server(manager_pid)
RuntimeServer.set_owner(runtime_server_pid, self())