2
0
Fork 0
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:
Sam 2017-04-21 17:12:29 -04:00
parent e189ec2def
commit b077335a30
2 changed files with 27 additions and 4 deletions

View file

@ -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)