mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-23 22:37:41 +08:00
Fix logs not getting captured in RuntimeServer tests
This commit is contained in:
parent
0711040d67
commit
9ce18a3df8
1 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,10 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServerTest do
|
|||
assert_receive {:runtime_evaluation_output, :e1, terminal_text(log_message, true)}
|
||||
|
||||
assert log_message =~ "[error] hey"
|
||||
|
||||
# Stop the server explicitly to make sure all logger messages are
|
||||
# sent by the time the test ends and stops capturing logs
|
||||
RuntimeServer.stop(pid)
|
||||
end
|
||||
|
||||
test "supports cross-container evaluation context references", %{pid: pid} do
|
||||
|
@ -219,6 +223,10 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServerTest do
|
|||
|
||||
assert_receive {:runtime_container_down, :c1, message}
|
||||
assert message =~ "(RuntimeError) error"
|
||||
|
||||
# Stop the server explicitly to make sure all logger messages are
|
||||
# sent by the time the test ends and stops capturing logs
|
||||
RuntimeServer.stop(pid)
|
||||
end
|
||||
|
||||
describe "smart cells" do
|
||||
|
@ -283,6 +291,10 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServerTest do
|
|||
test "notifies runtime owner when a smart cell fails to start", %{pid: pid} do
|
||||
RuntimeServer.start_smart_cell(pid, "dumb", "ref", %{"crash" => true}, [])
|
||||
assert_receive {:runtime_smart_cell_down, "ref"}
|
||||
|
||||
# Stop the server explicitly to make sure all logger messages are
|
||||
# sent by the time the test ends and stops capturing logs
|
||||
RuntimeServer.stop(pid)
|
||||
end
|
||||
|
||||
@tag opts: @opts
|
||||
|
|
Loading…
Reference in a new issue