Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Dec 20, 2023
1 parent 571d942 commit 156286b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/redis_client/connection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,20 @@ def test_reconnect_on_masterdown
server_thread&.kill
end

def test_debug_crash
conn = new_client.send(:ensure_connected)
p conn
GC.auto_compact = true
10.times do
conn.feed("*1\r\n*3\r\n$4\r\n1842\r\n$1\r\n0\r\n$1\r\n1\r\n")
GC.stress = true
assert_equal [["1842", "0", "1"]], conn.read
GC.stress = false
end
ensure
GC.stress = false
end

private

def new_client(**overrides)
Expand Down

0 comments on commit 156286b

Please sign in to comment.