mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(portal): add assert_receive to wait until pid is started (#3973)
Should fix https://github.com/firezone/firezone/actions/runs/8159796064/job/22304910482#step:12:20
This commit is contained in:
@@ -30,6 +30,7 @@ defmodule Domain.Jobs.Executors.GlobalTest do
|
||||
|
||||
test "registers itself as a leader if there is no global name registered" do
|
||||
assert {:ok, pid} = start_link({{__MODULE__, :send_test_message}, 25, test_pid: self()})
|
||||
assert_receive {:executed, ^pid, _time}, 500
|
||||
name = {Domain.Jobs.Executors.Global, __MODULE__, :send_test_message}
|
||||
assert :global.whereis_name(name) == pid
|
||||
|
||||
@@ -54,6 +55,8 @@ defmodule Domain.Jobs.Executors.GlobalTest do
|
||||
assert {:ok, fallback2_pid} =
|
||||
start_link({{__MODULE__, :send_test_message}, 25, test_pid: self()})
|
||||
|
||||
assert_receive {:executed, ^leader_pid, _time}, 500
|
||||
|
||||
name = {Domain.Jobs.Executors.Global, __MODULE__, :send_test_message}
|
||||
assert :global.whereis_name(name) == leader_pid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user