From 156286bc203b4b9e96279a926d6034cb15d0ba01 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 20 Dec 2023 11:11:47 +0100 Subject: [PATCH] WIP --- test/redis_client/connection_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/redis_client/connection_test.rb b/test/redis_client/connection_test.rb index fde44b2..0693d67 100644 --- a/test/redis_client/connection_test.rb +++ b/test/redis_client/connection_test.rb @@ -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)