diff --git a/internal/resp_assertions/string_array_assertion.go b/internal/resp_assertions/string_array_assertion.go new file mode 100644 index 00000000..995b3a08 --- /dev/null +++ b/internal/resp_assertions/string_array_assertion.go @@ -0,0 +1,39 @@ +package resp_assertions + +import ( + "fmt" + + resp_value "github.com/codecrafters-io/redis-tester/internal/resp/value" +) + +type StringArrayAssertion struct { + ExpectedValue []string +} + +func NewStringArrayAssertion(expectedValue []string) RESPAssertion { + return StringArrayAssertion{ExpectedValue: expectedValue} +} + +func (a StringArrayAssertion) Run(value resp_value.Value) error { + if value.Type != resp_value.ARRAY { + return fmt.Errorf("Expected an array, got %s", value.Type) + } + + if len(value.Array()) != len(a.ExpectedValue) { + return fmt.Errorf("Expected %d elements in array, got %d (%s)", len(a.ExpectedValue), len(value.Array()), value.FormattedString()) + } + + for i, expectedValue := range a.ExpectedValue { + actualElement := value.Array()[i] + + if actualElement.Type != resp_value.BULK_STRING && actualElement.Type != resp_value.SIMPLE_STRING { + return fmt.Errorf("Expected element #%d to be a string, got %s", i+1, actualElement.Type) + } + + if actualElement.String() != expectedValue { + return fmt.Errorf("Expected element #%d to be %q, got %q", i+1, expectedValue, actualElement.String()) + } + } + + return nil +} diff --git a/internal/stages_test.go b/internal/stages_test.go index 59ca7acd..d6247bc6 100644 --- a/internal/stages_test.go +++ b/internal/stages_test.go @@ -96,15 +96,17 @@ func TestStages(t *testing.T) { func normalizeTesterOutput(testerOutput []byte) []byte { replacements := map[string][]*regexp.Regexp{ - "tcp_port": {regexp.MustCompile(`read tcp 127.0.0.1:\d+->127.0.0.1:6379: read: connection reset by peer`)}, - " tmp_dir ": {regexp.MustCompile(` /private/var/folders/[^ ]+ `), regexp.MustCompile(` /tmp/[^ ]+ `)}, - "timestamp": {regexp.MustCompile(`\d{2}:\d{2}:\d{2}\.\d{3}`)}, - "info_replication": {regexp.MustCompile(`"# Replication\\r\\n[^"]+"`)}, - "replication_id": {regexp.MustCompile(`FULLRESYNC [A-Za-z0-9]+ 0`)}, - "wait_timeout": {regexp.MustCompile(`WAIT command returned after [0-9]+ ms`)}, - "xadd_id": {regexp.MustCompile(`\d{13}-\d+`)}, - "rdb_bytes": {regexp.MustCompile(`"\$[0-9]+\\r\\nREDIS.*"`)}, - "info_replication_bytes": {regexp.MustCompile(`"\$[0-9]+\\r\\n# Replication\\r\\n[^"]+"`)}, + "tcp_port": {regexp.MustCompile(`read tcp 127.0.0.1:\d+->127.0.0.1:6379: read: connection reset by peer`)}, + " tmp_dir ": {regexp.MustCompile(` /private/var/folders/[^ ]+ `), regexp.MustCompile(` /tmp/[^ ]+ `)}, + "$length\\r\\ntmp_dir\\r": {regexp.MustCompile(`\$\d+\\r\\n/private/var/folders/[^ ]+\\r\\n`), regexp.MustCompile(`\$\d+\\r\\n/tmp/[^ ]+\\r\\n`)}, + "\"tmp_dir\"": {regexp.MustCompile(`"/private/var/folders/[^"]+"`), regexp.MustCompile(`"/tmp/[^"]+"`)}, + "timestamp": {regexp.MustCompile(`\d{2}:\d{2}:\d{2}\.\d{3}`)}, + "info_replication": {regexp.MustCompile(`"# Replication\\r\\n[^"]+"`)}, + "replication_id": {regexp.MustCompile(`FULLRESYNC [A-Za-z0-9]+ 0`)}, + "wait_timeout": {regexp.MustCompile(`WAIT command returned after [0-9]+ ms`)}, + "xadd_id": {regexp.MustCompile(`\d{13}-\d+`)}, + "rdb_bytes": {regexp.MustCompile(`"\$[0-9]+\\r\\nREDIS.*"`)}, + "info_replication_bytes": {regexp.MustCompile(`"\$[0-9]+\\r\\n# Replication\\r\\n[^"]+"`)}, } for replacement, regexes := range replacements { diff --git a/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass b/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass index d45f68d6..58cb0d8b 100644 --- a/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass +++ b/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass @@ -117,15 +117,15 @@ Debug = true [stage-7] Received bytes: "+OK\r\n" [stage-7] Received RESP value: "OK" [stage-7] Received "OK" -[stage-7] Received OK at 23:38:34.936 -[stage-7] Fetching key "pineapple" at 23:38:34.936 (should not be expired) +[stage-7] Received OK at 17:35:38.574 +[stage-7] Fetching key "pineapple" at 17:35:38.574 (should not be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$5\r\ngrape\r\n" [stage-7] Received RESP value: "grape" [stage-7] Received "grape" [stage-7] Sleeping for 101ms -[stage-7] Fetching key "pineapple" at 23:38:35.040 (should be expired) +[stage-7] Fetching key "pineapple" at 17:35:38.678 (should be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$-1\r\n" @@ -136,15 +136,19 @@ Debug = true [stage-7] Program terminated successfully [stage-8] Running tests for Stage #8: rdb-config -[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles4183027736 --dbfilename banana.rdb -[stage-8] $ redis-cli CONFIG GET dir +[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3201160377 --dbfilename banana.rdb +[stage-8] $ redis-cli config get dir +[stage-8] Sent bytes: "*3\r\n$6\r\nconfig\r\n$3\r\nget\r\n$3\r\ndir\r\n" +[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3201160377\r\n" +[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3201160377"] +[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3201160377"] [stage-8] Test passed. [stage-8] Terminating program [stage-8] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-9] Running tests for Stage #9: rdb-read-key [stage-9] Created RDB file with single key: "orange" -[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2711962083 --dbfilename pineapple.rdb +[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles612685144 --dbfilename pineapple.rdb [stage-9] $ redis-cli KEYS * [stage-9] Test passed. [stage-9] Terminating program @@ -152,7 +156,7 @@ Debug = true [stage-10] Running tests for Stage #10: rdb-read-string-value [stage-10] Created RDB file with single key-value pair: blueberry="orange" -[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles4240521256 --dbfilename pear.rdb +[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1355706126 --dbfilename pear.rdb [stage-10] $ redis-cli GET blueberry [stage-10] Test passed. [stage-10] Terminating program @@ -160,7 +164,7 @@ Debug = true [stage-11] Running tests for Stage #11: rdb-read-multiple-keys [stage-11] Created RDB file with 4 keys: ["grape" "pear" "strawberry" "banana"] -[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1371607472 --dbfilename pineapple.rdb +[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2695265970 --dbfilename pineapple.rdb [stage-11] $ redis-cli KEYS * [stage-11] Test passed. [stage-11] Terminating program @@ -168,7 +172,7 @@ Debug = true [stage-12] Running tests for Stage #12: rdb-read-multiple-string-values [stage-12] Created RDB file with key-value pairs: "grape"="raspberry", "pineapple"="mango", "mango"="blueberry" -[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3568218811 --dbfilename pineapple.rdb +[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1310138984 --dbfilename pineapple.rdb [stage-12] $ redis-cli GET grape [stage-12] $ redis-cli GET pineapple [stage-12] $ redis-cli GET mango @@ -177,7 +181,7 @@ Debug = true [stage-12] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-13] Running tests for Stage #13: rdb-read-value-with-expiry -[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2503190132 --dbfilename banana.rdb +[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3173545518 --dbfilename banana.rdb [stage-13] $ redis-cli GET strawberry [stage-13] $ redis-cli GET pear [stage-13] $ redis-cli GET raspberry diff --git a/internal/test_helpers/fixtures/repl-wait/pass b/internal/test_helpers/fixtures/repl-wait/pass index 9ee97ca0..8a396b2c 100644 --- a/internal/test_helpers/fixtures/repl-wait/pass +++ b/internal/test_helpers/fixtures/repl-wait/pass @@ -117,15 +117,15 @@ Debug = true [stage-7] Received bytes: "+OK\r\n" [stage-7] Received RESP value: "OK" [stage-7] Received "OK" -[stage-7] Received OK at 17:20:07.305 -[stage-7] Fetching key "pineapple" at 17:20:07.305 (should not be expired) +[stage-7] Received OK at 17:47:16.615 +[stage-7] Fetching key "pineapple" at 17:47:16.615 (should not be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$5\r\ngrape\r\n" [stage-7] Received RESP value: "grape" [stage-7] Received "grape" [stage-7] Sleeping for 101ms -[stage-7] Fetching key "pineapple" at 17:20:07.409 (should be expired) +[stage-7] Fetching key "pineapple" at 17:47:16.719 (should be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$-1\r\n" @@ -136,15 +136,19 @@ Debug = true [stage-7] Program terminated successfully [stage-8] Running tests for Stage #8: rdb-config -[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2232985854 --dbfilename banana.rdb -[stage-8] $ redis-cli CONFIG GET dir +[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391 --dbfilename banana.rdb +[stage-8] $ redis-cli config get dir +[stage-8] Sent bytes: "*3\r\n$6\r\nconfig\r\n$3\r\nget\r\n$3\r\ndir\r\n" +[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391\r\n" +[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391"] +[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391"] [stage-8] Test passed. [stage-8] Terminating program [stage-8] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-9] Running tests for Stage #9: rdb-read-key [stage-9] Created RDB file with single key: "orange" -[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2597796900 --dbfilename pineapple.rdb +[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1725286669 --dbfilename pineapple.rdb [stage-9] $ redis-cli KEYS * [stage-9] Test passed. [stage-9] Terminating program @@ -152,7 +156,7 @@ Debug = true [stage-10] Running tests for Stage #10: rdb-read-string-value [stage-10] Created RDB file with single key-value pair: blueberry="orange" -[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3263015254 --dbfilename pear.rdb +[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1751575516 --dbfilename pear.rdb [stage-10] $ redis-cli GET blueberry [stage-10] Test passed. [stage-10] Terminating program @@ -160,7 +164,7 @@ Debug = true [stage-11] Running tests for Stage #11: rdb-read-multiple-keys [stage-11] Created RDB file with 4 keys: ["grape" "pear" "strawberry" "banana"] -[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles345388853 --dbfilename pineapple.rdb +[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1718759447 --dbfilename pineapple.rdb [stage-11] $ redis-cli KEYS * [stage-11] Test passed. [stage-11] Terminating program @@ -168,7 +172,7 @@ Debug = true [stage-12] Running tests for Stage #12: rdb-read-multiple-string-values [stage-12] Created RDB file with key-value pairs: "grape"="raspberry", "pineapple"="mango", "mango"="blueberry" -[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3745345187 --dbfilename pineapple.rdb +[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles634078774 --dbfilename pineapple.rdb [stage-12] $ redis-cli GET grape [stage-12] $ redis-cli GET pineapple [stage-12] $ redis-cli GET mango @@ -177,7 +181,7 @@ Debug = true [stage-12] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-13] Running tests for Stage #13: rdb-read-value-with-expiry -[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1742377574 --dbfilename banana.rdb +[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles151254015 --dbfilename banana.rdb [stage-13] $ redis-cli GET strawberry [stage-13] $ redis-cli GET pear [stage-13] $ redis-cli GET raspberry @@ -198,9 +202,9 @@ Debug = true [stage-15] $ ./spawn_redis_server.sh [stage-15] client: $ redis-cli INFO replication [stage-15] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a62981822d94ed5209012c3aa202e89ef76a506b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a62981822d94ed5209012c3aa202e89ef76a506b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a62981822d94ed5209012c3aa202e89ef76a506b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-15] Found role:master in response. [stage-15] Test passed. [stage-15] Terminating program @@ -240,9 +244,9 @@ Debug = true [stage-17] $ ./spawn_redis_server.sh [stage-17] client: $ redis-cli INFO replication [stage-17] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:80399efaf54c455e3f4ae566bb74207a37b33997\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:80399efaf54c455e3f4ae566bb74207a37b33997\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:80399efaf54c455e3f4ae566bb74207a37b33997\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-17] Found master_replid:xxx in response. [stage-17] Found master_reploffset:0 in response. [stage-17] Test passed. @@ -350,9 +354,9 @@ Debug = true [stage-22] Received "OK" [stage-22] client: $ redis-cli PSYNC ? -1 [stage-22] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-22] client: Received bytes: "+FULLRESYNC 51f3b7591cedbd6b503774bc94290194b30ba0fc 0\r\n" -[stage-22] client: Received RESP value: "FULLRESYNC 51f3b7591cedbd6b503774bc94290194b30ba0fc 0" -[stage-22] Received "FULLRESYNC 51f3b7591cedbd6b503774bc94290194b30ba0fc 0" +[stage-22] client: Received bytes: "+FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0\r\n" +[stage-22] client: Received RESP value: "FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0" +[stage-22] Received "FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0" [stage-22] Test passed. [stage-22] Terminating program [stage-22] Program terminated successfully @@ -376,11 +380,11 @@ Debug = true [stage-23] Received "OK" [stage-23] client: $ redis-cli PSYNC ? -1 [stage-23] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-23] client: Received bytes: "+FULLRESYNC d3d5bc0ba4f24fa66f9999ddd76c96e1ddcecace 0\r\n" -[stage-23] client: Received RESP value: "FULLRESYNC d3d5bc0ba4f24fa66f9999ddd76c96e1ddcecace 0" -[stage-23] Received "FULLRESYNC d3d5bc0ba4f24fa66f9999ddd76c96e1ddcecace 0" +[stage-23] client: Received bytes: "+FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0\r\n" +[stage-23] client: Received RESP value: "FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0" +[stage-23] Received "FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0" [stage-23] Reading RDB file... -[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ȁ\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(d3d5bc0ba4f24fa66f9999ddd76c96e1ddcecace\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xef\xc0\xf3=%\x00\x17X" +[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc2 \x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffi\x06\"\xba$\xfe'\xd8" [stage-23] Received RDB file [stage-23] Test passed. [stage-23] Terminating program @@ -405,11 +409,11 @@ Debug = true [stage-24] Received "OK" [stage-24] replica: $ redis-cli PSYNC ? -1 [stage-24] replica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-24] replica: Received bytes: "+FULLRESYNC bb83aa2b826107bb0b1e3245705670a4754aad33 0\r\n" -[stage-24] replica: Received RESP value: "FULLRESYNC bb83aa2b826107bb0b1e3245705670a4754aad33 0" -[stage-24] Received "FULLRESYNC bb83aa2b826107bb0b1e3245705670a4754aad33 0" +[stage-24] replica: Received bytes: "+FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0\r\n" +[stage-24] replica: Received RESP value: "FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0" +[stage-24] Received "FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0" [stage-24] Reading RDB file... -[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ȁ\rf\xfa\bused-mem\xc20S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bb83aa2b826107bb0b1e3245705670a4754aad33\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff,\xd2f\x1b\xb3\x19^e" +[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc2\x10S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(768b8481315fa9e1b1b08c12770f83c01c66ebe0\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xd3Mp\xf5\xa1\x99h*" [stage-24] Received RDB file [stage-24] client: $ redis-cli SET foo 123 [stage-24] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -461,11 +465,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-1: $ redis-cli PSYNC ? -1 [stage-25] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-1: Received bytes: "+FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0\r\n" -[stage-25] replica-1: Received RESP value: "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" -[stage-25] Received "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" +[stage-25] replica-1: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" +[stage-25] replica-1: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" [stage-25] Reading RDB file... -[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ȁ\rf\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ea81298140f48e258c5395e558956b08ec10e5bb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffC\xf3\x17\xc8\xf7\x8a2\x1b" +[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc20S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xfff4\n\xafN\xcbf\x8d" [stage-25] Received RDB file [stage-25] Creating replica: 2 [stage-25] replica-2: $ redis-cli PING @@ -485,11 +489,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-2: $ redis-cli PSYNC ? -1 [stage-25] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-2: Received bytes: "+FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0\r\n" -[stage-25] replica-2: Received RESP value: "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" -[stage-25] Received "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" +[stage-25] replica-2: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" +[stage-25] replica-2: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" [stage-25] Reading RDB file... -[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ȁ\rf\xfa\bused-mem\xc2\xc0\xc2\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ea81298140f48e258c5395e558956b08ec10e5bb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\bpp\r;\x1b\xb7\xe8" +[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\u00a0:\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa72lt\x90%\x8b\xee" [stage-25] Received RDB file [stage-25] Creating replica: 3 [stage-25] replica-3: $ redis-cli PING @@ -509,11 +513,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-3: $ redis-cli PSYNC ? -1 [stage-25] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-3: Received bytes: "+FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0\r\n" -[stage-25] replica-3: Received RESP value: "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" -[stage-25] Received "FULLRESYNC ea81298140f48e258c5395e558956b08ec10e5bb 0" +[stage-25] replica-3: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" +[stage-25] replica-3: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" [stage-25] Reading RDB file... -[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2Ɂ\rf\xfa\bused-mem\xc2\xd0I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ea81298140f48e258c5395e558956b08ec10e5bb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff#a┴݃\xb4" +[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem°I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xf3S\xa7\x97\xf6-\x81\xfc" [stage-25] Received RDB file [stage-25] client: $ redis-cli SET foo 123 [stage-25] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -742,11 +746,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-1: $ redis-cli PSYNC ? -1 [stage-30] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-1: Received bytes: "+FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0\r\n" -[stage-30] replica-1: Received RESP value: "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" -[stage-30] Received "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" +[stage-30] replica-1: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" +[stage-30] replica-1: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" [stage-30] Reading RDB file... -[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ʁ\rf\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(795ce062c8e6e4af49e6ff58d741b74a0276e1cd\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffгY\vA\\c|" +[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffc\x02\xbb\xff\xa6!\xc7u" [stage-30] Received RDB file [stage-30] Creating replica: 2 [stage-30] replica-2: $ redis-cli PING @@ -766,11 +770,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-2: $ redis-cli PSYNC ? -1 [stage-30] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-2: Received bytes: "+FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0\r\n" -[stage-30] replica-2: Received RESP value: "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" -[stage-30] Received "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" +[stage-30] replica-2: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" +[stage-30] replica-2: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" [stage-30] Reading RDB file... -[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ʁ\rf\xfa\bused-mem\xc2\xf0\xb9\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(795ce062c8e6e4af49e6ff58d741b74a0276e1cd\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffm\xbf\x84\x93\x9f\xa0\xb5\"" +[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xd0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffY\x82\x84\x84\x0f!\xeeZ" [stage-30] Received RDB file [stage-30] Creating replica: 3 [stage-30] replica-3: $ redis-cli PING @@ -790,11 +794,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-3: $ redis-cli PSYNC ? -1 [stage-30] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-3: Received bytes: "+FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0\r\n" -[stage-30] replica-3: Received RESP value: "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" -[stage-30] Received "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" +[stage-30] replica-3: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" +[stage-30] replica-3: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" [stage-30] Reading RDB file... -[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ʁ\rf\xfa\bused-mem\xc2\xf0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(795ce062c8e6e4af49e6ff58d741b74a0276e1cd\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xd2\x14\xfe8\x01\x93\xdd}" +[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffa\xa5\x1c\xcc\xe6\xeeyt" [stage-30] Received RDB file [stage-30] Creating replica: 4 [stage-30] replica-4: $ redis-cli PING @@ -814,11 +818,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-4: $ redis-cli PSYNC ? -1 [stage-30] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-4: Received bytes: "+FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0\r\n" -[stage-30] replica-4: Received RESP value: "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" -[stage-30] Received "FULLRESYNC 795ce062c8e6e4af49e6ff58d741b74a0276e1cd 0" +[stage-30] replica-4: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" +[stage-30] replica-4: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" [stage-30] Reading RDB file... -[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2ʁ\rf\xfa\bused-mem\xc2\x00\x8c\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(795ce062c8e6e4af49e6ff58d741b74a0276e1cd\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffw\x06o~(Z\xb0\x86" +[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xd4\xe3\x05\x90?\xf01\xaa" [stage-30] Received RDB file [stage-30] client: $ redis-cli WAIT 3 500 [stage-30] client: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n" @@ -865,11 +869,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-1: $ redis-cli PSYNC ? -1 [stage-31] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-1: Received bytes: "+FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0\r\n" -[stage-31] replica-1: Received RESP value: "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" -[stage-31] Received "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" +[stage-31] replica-1: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" +[stage-31] replica-1: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" [stage-31] Reading RDB file... -[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2́\rf\xfa\bused-mem\xc2 \x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4e2f7a34eca02d10b467e469ec9d93fdceb1c878\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff+v\xcc\n\xa4\x18'\x06" +[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xaf\xf0e\xf46&\xa3\xa8" [stage-31] Received RDB file [stage-31] Creating replica: 2 [stage-31] replica-2: $ redis-cli PING @@ -889,11 +893,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-2: $ redis-cli PSYNC ? -1 [stage-31] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-2: Received bytes: "+FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0\r\n" -[stage-31] replica-2: Received RESP value: "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" -[stage-31] Received "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" +[stage-31] replica-2: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" +[stage-31] replica-2: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" [stage-31] Reading RDB file... -[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2́\rf\xfa\bused-mem°\xb9\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4e2f7a34eca02d10b467e469ec9d93fdceb1c878\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x96z\x11\x92z\xe4\xf1X" +[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2й\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x12\xfc\xb8l\xe8\xdau\xf6" [stage-31] Received RDB file [stage-31] Creating replica: 3 [stage-31] replica-3: $ redis-cli PING @@ -913,11 +917,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-3: $ redis-cli PSYNC ? -1 [stage-31] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-3: Received bytes: "+FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0\r\n" -[stage-31] replica-3: Received RESP value: "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" -[stage-31] Received "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" +[stage-31] replica-3: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" +[stage-31] replica-3: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" [stage-31] Reading RDB file... -[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2́\rf\xfa\bused-mem°@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4e2f7a34eca02d10b467e469ec9d93fdceb1c878\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff)\xd1k9\xe4י\a" +[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xadW\xc2\xc7v\xe9\x1d\xa9" [stage-31] Received RDB file [stage-31] Creating replica: 4 [stage-31] replica-4: $ redis-cli PING @@ -937,11 +941,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-4: $ redis-cli PSYNC ? -1 [stage-31] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-4: Received bytes: "+FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0\r\n" -[stage-31] replica-4: Received RESP value: "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" -[stage-31] Received "FULLRESYNC 4e2f7a34eca02d10b467e469ec9d93fdceb1c878 0" +[stage-31] replica-4: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" +[stage-31] replica-4: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" [stage-31] Reading RDB file... -[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2́\rf\xfa\bused-mem\xc2\xc0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4e2f7a34eca02d10b467e469ec9d93fdceb1c878\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff~qB2\xa3\x00k5" +[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x18\x11ۛ\xaf\xf7Uw" [stage-31] Received RDB file [stage-31] client: $ redis-cli SET foo 123 [stage-31] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -1034,7 +1038,7 @@ Debug = true [stage-31] Received ["REPLCONF", "GETACK", "*"] [stage-31] client: Received bytes: ":3\r\n" [stage-31] client: Received RESP value: 3 -[stage-31] WAIT command returned after 2099 ms +[stage-31] WAIT command returned after 2106 ms [stage-31] Test passed. [stage-31] Terminating program [stage-31] Program terminated successfully diff --git a/internal/test_helpers/fixtures/streams/pass b/internal/test_helpers/fixtures/streams/pass index af3f1b76..7cf3c392 100644 --- a/internal/test_helpers/fixtures/streams/pass +++ b/internal/test_helpers/fixtures/streams/pass @@ -117,15 +117,15 @@ Debug = true [stage-7] Received bytes: "+OK\r\n" [stage-7] Received RESP value: "OK" [stage-7] Received "OK" -[stage-7] Received OK at 17:20:33.475 -[stage-7] Fetching key "pineapple" at 17:20:33.475 (should not be expired) +[stage-7] Received OK at 17:48:20.952 +[stage-7] Fetching key "pineapple" at 17:48:20.952 (should not be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$5\r\ngrape\r\n" [stage-7] Received RESP value: "grape" [stage-7] Received "grape" [stage-7] Sleeping for 101ms -[stage-7] Fetching key "pineapple" at 17:20:33.578 (should be expired) +[stage-7] Fetching key "pineapple" at 17:48:21.056 (should be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$-1\r\n" @@ -136,15 +136,19 @@ Debug = true [stage-7] Program terminated successfully [stage-8] Running tests for Stage #8: rdb-config -[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1920818580 --dbfilename banana.rdb -[stage-8] $ redis-cli CONFIG GET dir +[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484 --dbfilename banana.rdb +[stage-8] $ redis-cli config get dir +[stage-8] Sent bytes: "*3\r\n$6\r\nconfig\r\n$3\r\nget\r\n$3\r\ndir\r\n" +[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484\r\n" +[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484"] +[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484"] [stage-8] Test passed. [stage-8] Terminating program [stage-8] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-9] Running tests for Stage #9: rdb-read-key [stage-9] Created RDB file with single key: "orange" -[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2126141097 --dbfilename pineapple.rdb +[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2636860651 --dbfilename pineapple.rdb [stage-9] $ redis-cli KEYS * [stage-9] Test passed. [stage-9] Terminating program @@ -152,7 +156,7 @@ Debug = true [stage-10] Running tests for Stage #10: rdb-read-string-value [stage-10] Created RDB file with single key-value pair: blueberry="orange" -[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3722495243 --dbfilename pear.rdb +[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1561295186 --dbfilename pear.rdb [stage-10] $ redis-cli GET blueberry [stage-10] Test passed. [stage-10] Terminating program @@ -160,7 +164,7 @@ Debug = true [stage-11] Running tests for Stage #11: rdb-read-multiple-keys [stage-11] Created RDB file with 4 keys: ["grape" "pear" "strawberry" "banana"] -[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3794565545 --dbfilename pineapple.rdb +[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1566131716 --dbfilename pineapple.rdb [stage-11] $ redis-cli KEYS * [stage-11] Test passed. [stage-11] Terminating program @@ -168,7 +172,7 @@ Debug = true [stage-12] Running tests for Stage #12: rdb-read-multiple-string-values [stage-12] Created RDB file with key-value pairs: "grape"="raspberry", "pineapple"="mango", "mango"="blueberry" -[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles778702024 --dbfilename pineapple.rdb +[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3986972646 --dbfilename pineapple.rdb [stage-12] $ redis-cli GET grape [stage-12] $ redis-cli GET pineapple [stage-12] $ redis-cli GET mango @@ -177,7 +181,7 @@ Debug = true [stage-12] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-13] Running tests for Stage #13: rdb-read-value-with-expiry -[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2789281079 --dbfilename banana.rdb +[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4076755790 --dbfilename banana.rdb [stage-13] $ redis-cli GET strawberry [stage-13] $ redis-cli GET pear [stage-13] $ redis-cli GET raspberry @@ -198,9 +202,9 @@ Debug = true [stage-15] $ ./spawn_redis_server.sh [stage-15] client: $ redis-cli INFO replication [stage-15] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d12461bdae51a44be0c02225d1348b853be44344\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d12461bdae51a44be0c02225d1348b853be44344\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d12461bdae51a44be0c02225d1348b853be44344\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-15] Found role:master in response. [stage-15] Test passed. [stage-15] Terminating program @@ -240,9 +244,9 @@ Debug = true [stage-17] $ ./spawn_redis_server.sh [stage-17] client: $ redis-cli INFO replication [stage-17] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:47b575a4952a0db1fc463a87dd4f05b759f2cf5b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:47b575a4952a0db1fc463a87dd4f05b759f2cf5b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:47b575a4952a0db1fc463a87dd4f05b759f2cf5b\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-17] Found master_replid:xxx in response. [stage-17] Found master_reploffset:0 in response. [stage-17] Test passed. @@ -350,9 +354,9 @@ Debug = true [stage-22] Received "OK" [stage-22] client: $ redis-cli PSYNC ? -1 [stage-22] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-22] client: Received bytes: "+FULLRESYNC 752075e791d9b3e9138ac146958e8feeca3ea2c2 0\r\n" -[stage-22] client: Received RESP value: "FULLRESYNC 752075e791d9b3e9138ac146958e8feeca3ea2c2 0" -[stage-22] Received "FULLRESYNC 752075e791d9b3e9138ac146958e8feeca3ea2c2 0" +[stage-22] client: Received bytes: "+FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0\r\n" +[stage-22] client: Received RESP value: "FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0" +[stage-22] Received "FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0" [stage-22] Test passed. [stage-22] Terminating program [stage-22] Program terminated successfully @@ -376,11 +380,11 @@ Debug = true [stage-23] Received "OK" [stage-23] client: $ redis-cli PSYNC ? -1 [stage-23] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-23] client: Received bytes: "+FULLRESYNC 337fef901339301ae7d760528615806a53d60c1a 0\r\n" -[stage-23] client: Received RESP value: "FULLRESYNC 337fef901339301ae7d760528615806a53d60c1a 0" -[stage-23] Received "FULLRESYNC 337fef901339301ae7d760528615806a53d60c1a 0" +[stage-23] client: Received bytes: "+FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0\r\n" +[stage-23] client: Received RESP value: "FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0" +[stage-23] Received "FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0" [stage-23] Reading RDB file... -[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe2\x81\rf\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(337fef901339301ae7d760528615806a53d60c1a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffk'n\x93\xc6\xe4\x84\xeb" +[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2e\x88\rf\xfa\bused-mem\xc2 \x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1d1dedb646da15e614b99758b88b80f86a7b3ede\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffr\xc3\xd8\xc7\xf8\x9c\xf9n" [stage-23] Received RDB file [stage-23] Test passed. [stage-23] Terminating program @@ -405,11 +409,11 @@ Debug = true [stage-24] Received "OK" [stage-24] replica: $ redis-cli PSYNC ? -1 [stage-24] replica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-24] replica: Received bytes: "+FULLRESYNC e2174629e450e9c7e5f2bb4f7b433d971fd0de80 0\r\n" -[stage-24] replica: Received RESP value: "FULLRESYNC e2174629e450e9c7e5f2bb4f7b433d971fd0de80 0" -[stage-24] Received "FULLRESYNC e2174629e450e9c7e5f2bb4f7b433d971fd0de80 0" +[stage-24] replica: Received bytes: "+FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0\r\n" +[stage-24] replica: Received RESP value: "FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0" +[stage-24] Received "FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0" [stage-24] Reading RDB file... -[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe2\x81\rf\xfa\bused-mem\xc2\xd0S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(e2174629e450e9c7e5f2bb4f7b433d971fd0de80\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffo\x1b\xb8_&F^\x93" +[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2e\x88\rf\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(d3fda7d996479245b1c1f590f097282bef62b4e5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffFa\xd4\xce\x1e/\xa31" [stage-24] Received RDB file [stage-24] client: $ redis-cli SET foo 123 [stage-24] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -461,11 +465,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-1: $ redis-cli PSYNC ? -1 [stage-25] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-1: Received bytes: "+FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0\r\n" -[stage-25] replica-1: Received RESP value: "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" -[stage-25] Received "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" +[stage-25] replica-1: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" +[stage-25] replica-1: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" [stage-25] Reading RDB file... -[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe3\x81\rf\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6b255f8fc2eeb5054cedba986fbb0b21fb8142c7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xac\xed1\x9a<\xb2\x86\xca" +[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem°S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff4\xbao\xf4\x8f\xacH\xf0" [stage-25] Received RDB file [stage-25] Creating replica: 2 [stage-25] replica-2: $ redis-cli PING @@ -485,11 +489,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-2: $ redis-cli PSYNC ? -1 [stage-25] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-2: Received bytes: "+FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0\r\n" -[stage-25] replica-2: Received RESP value: "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" -[stage-25] Received "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" +[stage-25] replica-2: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" +[stage-25] replica-2: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" [stage-25] Reading RDB file... -[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe3\x81\rf\xfa\bused-mem\xc2\xc0\xc2\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6b255f8fc2eeb5054cedba986fbb0b21fb8142c7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xe7nV_\xf0#\x039" +[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem\xc2 \xc3\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffJ\x17s\x84\xcfq\xcd\xcc" [stage-25] Received RDB file [stage-25] Creating replica: 3 [stage-25] replica-3: $ redis-cli PING @@ -509,11 +513,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-3: $ redis-cli PSYNC ? -1 [stage-25] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-3: Received bytes: "+FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0\r\n" -[stage-25] replica-3: Received RESP value: "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" -[stage-25] Received "FULLRESYNC 6b255f8fc2eeb5054cedba986fbb0b21fb8142c7 0" +[stage-25] replica-3: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" +[stage-25] replica-3: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" [stage-25] Reading RDB file... -[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe3\x81\rf\xfa\bused-mem\xc2\xd0I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6b255f8fc2eeb5054cedba986fbb0b21fb8142c7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff9\x8a\x9c\xa2\x84Ta\xbb" +[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem\xc20J\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x95<\xd8K\xf1\xb9\xf6\xfb" [stage-25] Received RDB file [stage-25] client: $ redis-cli SET foo 123 [stage-25] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -742,11 +746,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-1: $ redis-cli PSYNC ? -1 [stage-30] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-1: Received bytes: "+FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0\r\n" -[stage-30] replica-1: Received RESP value: "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" -[stage-30] Received "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" +[stage-30] replica-1: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" +[stage-30] replica-1: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" [stage-30] Reading RDB file... -[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe4\x81\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2a0117e8dad98cc8a5129c4726df77700e51a199\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffT\x17A\u06dd|v\xa7" +[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa1r\x11p?\xcfԍ" [stage-30] Received RDB file [stage-30] Creating replica: 2 [stage-30] replica-2: $ redis-cli PING @@ -766,11 +770,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-2: $ redis-cli PSYNC ? -1 [stage-30] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-2: Received bytes: "+FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0\r\n" -[stage-30] replica-2: Received RESP value: "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" -[stage-30] Received "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" +[stage-30] replica-2: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" +[stage-30] replica-2: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" [stage-30] Reading RDB file... -[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe4\x81\rf\xfa\bused-mem\xc2й\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2a0117e8dad98cc8a5129c4726df77700e51a199\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xe9\x1b\x9cCC\x80\xa0\xf9" +[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\xf0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x9b\xf2.\v\x96\xcf\xfd\xa2" [stage-30] Received RDB file [stage-30] Creating replica: 3 [stage-30] replica-3: $ redis-cli PING @@ -790,11 +794,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-3: $ redis-cli PSYNC ? -1 [stage-30] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-3: Received bytes: "+FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0\r\n" -[stage-30] replica-3: Received RESP value: "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" -[stage-30] Received "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" +[stage-30] replica-3: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" +[stage-30] replica-3: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" [stage-30] Reading RDB file... -[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe4\x81\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2a0117e8dad98cc8a5129c4726df77700e51a199\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffV\xb0\xe6\xe8ݳȦ" +[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\xf0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa3նC\x7f\x00j\x8c" [stage-30] Received RDB file [stage-30] Creating replica: 4 [stage-30] replica-4: $ redis-cli PING @@ -814,11 +818,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-4: $ redis-cli PSYNC ? -1 [stage-30] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-4: Received bytes: "+FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0\r\n" -[stage-30] replica-4: Received RESP value: "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" -[stage-30] Received "FULLRESYNC 2a0117e8dad98cc8a5129c4726df77700e51a199 0" +[stage-30] replica-4: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" +[stage-30] replica-4: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" [stage-30] Reading RDB file... -[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe4\x81\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2a0117e8dad98cc8a5129c4726df77700e51a199\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xe3\xf6\xff\xb4\x04\xad\x80x" +[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\x00\x8c\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x06\xc7'\x05V\xc9\aw" [stage-30] Received RDB file [stage-30] client: $ redis-cli WAIT 3 500 [stage-30] client: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n" @@ -865,11 +869,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-1: $ redis-cli PSYNC ? -1 [stage-31] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-1: Received bytes: "+FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0\r\n" -[stage-31] replica-1: Received RESP value: "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" -[stage-31] Received "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" +[stage-31] replica-1: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" +[stage-31] replica-1: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" [stage-31] Reading RDB file... -[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe6\x81\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(b8c7b29e371019dad5dec7fe930ae336fb59d21b\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb4Rl\x11e\xe2wt" +[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\xc2\x00\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8d(\x17\x14\x86\xf5e\xcd" [stage-31] Received RDB file [stage-31] Creating replica: 2 [stage-31] replica-2: $ redis-cli PING @@ -889,11 +893,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-2: $ redis-cli PSYNC ? -1 [stage-31] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-2: Received bytes: "+FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0\r\n" -[stage-31] replica-2: Received RESP value: "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" -[stage-31] Received "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" +[stage-31] replica-2: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" +[stage-31] replica-2: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" [stage-31] Reading RDB file... -[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe6\x81\rf\xfa\bused-mem\xc2\xd0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(b8c7b29e371019dad5dec7fe930ae336fb59d21b\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8e\xd2Sj\xcc\xe2^[" +[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u0090\xb9\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff0$ʌX\t\xb3\x93" [stage-31] Received RDB file [stage-31] Creating replica: 3 [stage-31] replica-3: $ redis-cli PING @@ -913,11 +917,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-3: $ redis-cli PSYNC ? -1 [stage-31] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-3: Received bytes: "+FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0\r\n" -[stage-31] replica-3: Received RESP value: "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" -[stage-31] Received "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" +[stage-31] replica-3: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" +[stage-31] replica-3: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" [stage-31] Reading RDB file... -[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe6\x81\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(b8c7b29e371019dad5dec7fe930ae336fb59d21b\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb6\xf5\xcb\"%-\xc9u" +[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u0090@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8f\x8f\xb0'\xc6:\xdb\xcc" [stage-31] Received RDB file [stage-31] Creating replica: 4 [stage-31] replica-4: $ redis-cli PING @@ -937,11 +941,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-4: $ redis-cli PSYNC ? -1 [stage-31] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-4: Received bytes: "+FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0\r\n" -[stage-31] replica-4: Received RESP value: "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" -[stage-31] Received "FULLRESYNC b8c7b29e371019dad5dec7fe930ae336fb59d21b 0" +[stage-31] replica-4: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" +[stage-31] replica-4: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" [stage-31] Reading RDB file... -[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xe6\x81\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(b8c7b29e371019dad5dec7fe930ae336fb59d21b\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x03\xb3\xd2~\xfc3\x81\xab" +[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u00a0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff:ɩ{\x1f$\x93\x12" [stage-31] Received RDB file [stage-31] client: $ redis-cli SET foo 123 [stage-31] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -1034,7 +1038,7 @@ Debug = true [stage-31] Received ["REPLCONF", "GETACK", "*"] [stage-31] client: Received bytes: ":3\r\n" [stage-31] client: Received RESP value: 3 -[stage-31] WAIT command returned after 2108 ms +[stage-31] WAIT command returned after 2100 ms [stage-31] Test passed. [stage-31] Terminating program [stage-31] Program terminated successfully @@ -1092,7 +1096,7 @@ Debug = true [stage-36] Running tests for Stage #36: streams-xadd-full-autoid [stage-36] $ ./spawn_redis_server.sh [stage-36] $ redis-cli xadd "pear" * foo bar -[stage-36] Received response: ""1712161258394-0"" +[stage-36] Received response: ""1712162925251-0"" [stage-36] The first part of the ID is a valid unix milliseconds timestamp [stage-36] The second part of the ID is a valid sequence number [stage-36] Test passed. diff --git a/internal/test_rdb_config.go b/internal/test_rdb_config.go index d2406e77..21ad2085 100644 --- a/internal/test_rdb_config.go +++ b/internal/test_rdb_config.go @@ -5,7 +5,10 @@ import ( "os" "path/filepath" + "github.com/codecrafters-io/redis-tester/internal/instrumented_resp_connection" "github.com/codecrafters-io/redis-tester/internal/redis_executable" + "github.com/codecrafters-io/redis-tester/internal/resp_assertions" + "github.com/codecrafters-io/redis-tester/internal/test_cases" testerutils_random "github.com/codecrafters-io/tester-utils/random" "github.com/codecrafters-io/tester-utils/test_case_harness" @@ -32,30 +35,21 @@ func testRdbConfig(stageHarness *test_case_harness.TestCaseHarness) error { } logger := stageHarness.Logger - client := NewRedisClient("localhost:6379") - logger.Infof("$ redis-cli CONFIG GET dir") - resp, err := client.ConfigGet("dir").Result() + client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "") if err != nil { - logFriendlyError(logger, err) return err } - if len(resp) != 2 { - return fmt.Errorf("Expected 2 elements in response, got %d", len(resp)) - } - - if resp[0] != "dir" { - return fmt.Errorf("Expected first element in response to be 'dir', got %v", resp[0]) + commandTestCase := test_cases.SendCommandTestCase{ + Command: "config", + Args: []string{"get", "dir"}, + Assertion: resp_assertions.NewStringArrayAssertion([]string{"dir", tmpDir}), } - dirPath, ok := resp[1].(string) - if !ok { - return fmt.Errorf("Expected second element in response to be a string, got %T", resp[1]) - } - - if dirPath != tmpDir { - return fmt.Errorf("Expected second element in response to be %v, got %v", tmpDir, dirPath) + if err := commandTestCase.Run(client, logger); err != nil { + logFriendlyError(logger, err) + return err } client.Close()