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(...)
23
23
client = Async ::Container ::Supervisor ::Client . new ( instance , endpoint )
24
24
connection = client . connect
25
25
26
+ # Wait for the client to connect to the server:
26
27
sleep ( 0.001 ) until registration_monitor . registrations . any?
27
28
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 (
30
31
process_id : be == ::Process . pid
31
32
)
32
33
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
33
52
end
You can’t perform that action at this time.
0 commit comments