mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
make stat socket much more robust
This commit is contained in:
parent
e189ec2def
commit
b077335a30
2 changed files with 27 additions and 4 deletions
|
@ -29,6 +29,14 @@ describe StatsSocket do
|
|||
socket.close
|
||||
end
|
||||
|
||||
socket = UNIXSocket.new(socket_path)
|
||||
socket.send "gc_st", 0
|
||||
socket.flush
|
||||
sleep 0.001
|
||||
socket.send "at\n", 0
|
||||
line = socket.readline
|
||||
socket.close
|
||||
|
||||
parsed = JSON.parse(line)
|
||||
|
||||
expect(parsed.keys.sort).to eq(GC.stat.keys.map(&:to_s).sort)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue