Skip to content

Commit

Permalink
Fix race condition in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Sep 6, 2024
1 parent 4ede27c commit 628a33c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/livebook_web/live/session_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,12 @@ defmodule LivebookWeb.SessionLiveTest do
# Use the standalone runtime, to encapsulate env var changes
Session.set_runtime(session.pid, Runtime.Standalone.new())

# We start the runtime before adding the env var setting,
# otherwise a concurrent embedded runtime server could set PATH
# in this node and the standalone runtime would inherit it
Session.subscribe(session.id)
connect_and_await_runtime(session.pid)

separator =
case :os.type() do
{:win32, _} -> ";"
Expand Down

0 comments on commit 628a33c

Please sign in to comment.