diff --git a/lib/livebook/session.ex b/lib/livebook/session.ex index 818a542ad..d4a97a7cb 100644 --- a/lib/livebook/session.ex +++ b/lib/livebook/session.ex @@ -1641,7 +1641,7 @@ defmodule Livebook.Session do end def handle_info({:runtime_app_info_request, reply_to}, state) do - send(reply_to, {:runtime_app_info_reply, app_info_for_runtime(state)}) + send(reply_to, {:runtime_app_info_reply, {:ok, app_info_for_runtime(state)}}) {:noreply, state} end diff --git a/test/livebook/session_test.exs b/test/livebook/session_test.exs index 85961af8f..e57077154 100644 --- a/test/livebook/session_test.exs +++ b/test/livebook/session_test.exs @@ -1447,7 +1447,7 @@ defmodule Livebook.SessionTest do send(session.pid, {:runtime_app_info_request, self()}) assert_receive {:runtime_app_info_reply, app_info} - assert app_info == %{type: :multi_session} + assert app_info == {:ok, %{type: :multi_session}} # Single-session @@ -1459,7 +1459,7 @@ defmodule Livebook.SessionTest do send(session.pid, {:runtime_app_info_request, self()}) assert_receive {:runtime_app_info_reply, app_info} - assert app_info == %{type: :single_session} + assert app_info == {:ok, %{type: :single_session}} App.close(app_pid) end @@ -1485,15 +1485,17 @@ defmodule Livebook.SessionTest do send(session.pid, {:runtime_app_info_request, self()}) assert_receive {:runtime_app_info_reply, app_info} - assert app_info == %{ - type: :multi_session, - started_by: %{ - source: :session, - id: "1234", - name: "Jake Peralta", - email: "jperalta@example.com" - } - } + assert app_info == + {:ok, + %{ + type: :multi_session, + started_by: %{ + source: :session, + id: "1234", + name: "Jake Peralta", + email: "jperalta@example.com" + } + }} # Single-session @@ -1505,7 +1507,7 @@ defmodule Livebook.SessionTest do send(session.pid, {:runtime_app_info_request, self()}) assert_receive {:runtime_app_info_reply, app_info} - assert app_info == %{type: :single_session} + assert app_info == {:ok, %{type: :single_session}} App.close(app_pid) end @@ -1517,7 +1519,7 @@ defmodule Livebook.SessionTest do send(session.pid, {:runtime_app_info_request, self()}) assert_receive {:runtime_app_info_reply, app_info} - assert app_info == %{type: :none} + assert app_info == {:ok, %{type: :none}} end describe "to_attachment_file_entry/2" do