File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,30 @@ def to_json(...)
2323 client = Async ::Container ::Supervisor ::Client . new ( instance , endpoint )
2424 connection = client . connect
2525
26+ # Wait for the client to connect to the server:
2627 sleep ( 0.001 ) until registration_monitor . registrations . any?
2728
28- registration = registration_monitor . registrations . first
29- expect ( registration . state ) . to have_keys (
29+ connection = registration_monitor . registrations . first
30+ expect ( connection . state ) . to have_keys (
3031 process_id : be == ::Process . pid
3132 )
3233 end
34+
35+ with "do_memory_dump" do
36+ it "can dump memory" do
37+ instance = FakeInstance . new
38+ client = Async ::Container ::Supervisor ::Client . new ( instance , endpoint )
39+ client_task = client . run
40+
41+ sleep ( 0.001 ) until registration_monitor . registrations . any?
42+
43+ path = File . join ( @root , "memory.json" )
44+ connection = registration_monitor . registrations . first
45+ connection . call ( do : :memory_dump , path : path )
46+
47+ expect ( File . size ( path ) ) . to be > 0
48+ ensure
49+ client_task &.stop
50+ end
51+ end
3352end
You can’t perform that action at this time.
0 commit comments