okami.mom/albedo

git clone https://git.nkp.pet/okami.mom/albedo

Aly Raffauftest(stream): cover replay across restarts9c2c62a

main
463 B13 linesraw
1%% Replace a real session actor and wait until its old lifetime has ended.
2-module(albedo_stream_replay_probe).
3-export([restart/1]).
4
5restart(Id) ->
6    {some, Session} = 'albedo@daemon@session':live(Id),
7    {ok, Pid} = 'gleam@erlang@process':subject_owner(Session),
8    Monitor = monitor(process, Pid),
9    exit(Pid, kill),
10    receive
11        {'DOWN', Monitor, process, Pid, killed} -> <<"actor_stopped">>
12    after 10000 -> error(actor_still_alive)
13    end.