diff --git a/Makefile b/Makefile
index 0cb0f9d5..412dd0a2 100644
--- a/Makefile
+++ b/Makefile
@@ -17,18 +17,6 @@ build:
test:
go test -count=1 -p 1 -v ./internal/...
-test_with_redis: build
- CODECRAFTERS_SUBMISSION_DIR=./internal/test_helpers/pass_all \
- CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"repl-wait\",\"tester_log_prefix\":\"stage-118\",\"title\":\"Stage #118: WAIT Command\"}]" \
- dist/main.out
-
-
-test_tmp: build
- cd /Users/ryang/Developer/byox/build-your-own-redis && \
- CODECRAFTERS_SUBMISSION_DIR=/Users/ryang/Developer/byox/build-your-own-redis \
- CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"zg5\",\"tester_log_prefix\":\"stage-201\",\"title\":\"Stage #1: RDB Config\"}, {\"slug\":\"jz6\",\"tester_log_prefix\":\"stage-202\",\"title\":\"Stage #2: RDB Read Key\"}, {\"slug\":\"gc6\",\"tester_log_prefix\":\"stage-203\",\"title\":\"Stage #3: RDB String Value\"}, {\"slug\":\"jw4\",\"tester_log_prefix\":\"stage-204\",\"title\":\"Stage #4: RDB Read Multiple Keys\"}, {\"slug\":\"dq3\",\"tester_log_prefix\":\"stage-205\",\"title\":\"Stage #5: RDB Read Multiple String Values\"}, {\"slug\":\"sm4\",\"tester_log_prefix\":\"stage-206\",\"title\":\"Stage #6: RDB Read Value With Expiry\"}]" \
- $(shell pwd)/dist/main.out
-
copy_course_file:
gh api repos/codecrafters-io/build-your-own-redis/contents/course-definition.yml \
| jq -r .content \
@@ -41,9 +29,20 @@ record_fixtures:
update_tester_utils:
go get -u github.com/codecrafters-io/tester-utils
-test_all_with_redis: build
+test_dev: build
+ cd /Users/ryang/Developer/byox/build-your-own-redis && \
+ CODECRAFTERS_SUBMISSION_DIR=/Users/ryang/Developer/byox/build-your-own-redis \
+ CODECRAFTERS_TEST_CASES_JSON="[]" \
+ $(shell pwd)/dist/main.out
+
+test_base_with_redis: build
CODECRAFTERS_SUBMISSION_DIR=./internal/test_helpers/pass_all \
- CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"jm1\",\"tester_log_prefix\":\"stage-1\",\"title\":\"Stage #1: Bind to a port\"},{\"slug\":\"rg2\",\"tester_log_prefix\":\"stage-2\",\"title\":\"Stage #2: Respond to PING\"},{\"slug\":\"wy1\",\"tester_log_prefix\":\"stage-3\",\"title\":\"Stage #3: Respond to multiple PINGs\"},{\"slug\":\"zu2\",\"tester_log_prefix\":\"stage-4\",\"title\":\"Stage #4: Handle concurrent clients\"},{\"slug\":\"qq0\",\"tester_log_prefix\":\"stage-5\",\"title\":\"Stage #5: Implement the ECHO command\"},{\"slug\":\"la7\",\"tester_log_prefix\":\"stage-6\",\"title\":\"Stage #6: Implement the SET \u0026 GET commands\"},{\"slug\":\"yz1\",\"tester_log_prefix\":\"stage-7\",\"title\":\"Stage #7: Expiry\"},{\"slug\":\"bw1\",\"tester_log_prefix\":\"stage-101\",\"title\":\"Stage #101: Replication - Custom Port\"}, {\"slug\":\"ye5\",\"tester_log_prefix\":\"stage-102\",\"title\":\"Stage #102: Replication - Info on Master\"},{\"slug\":\"hc6\",\"tester_log_prefix\":\"stage-103\",\"title\":\"Stage #103: Replication - Info on Replica\"}, {\"slug\":\"xc1\",\"tester_log_prefix\":\"stage-104\",\"title\":\"Stage #104: Replication - Replication ID and Offset\"}, {\"slug\":\"gl7\",\"tester_log_prefix\":\"stage-105\",\"title\":\"Stage #105: Replication - Handshake 1\"},{\"slug\":\"eh4\",\"tester_log_prefix\":\"stage-106\",\"title\":\"Stage #106: Replication - Handshake 2\"},{\"slug\":\"ju6\",\"tester_log_prefix\":\"stage-107\",\"title\":\"Stage #107: Replication - Handshake 3\"},{\"slug\":\"fj0\",\"tester_log_prefix\":\"stage-108\",\"title\":\"Stage #108: Replication - REPLCONF\"},{\"slug\":\"vm3\",\"tester_log_prefix\":\"stage-109\",\"title\":\"Stage #109: Replication - PSYNC\"},{\"slug\":\"cf8\",\"tester_log_prefix\":\"stage-110\",\"title\":\"Stage #110: Replication - PSYNC w RDB file\"},{\"slug\":\"zn8\",\"tester_log_prefix\":\"stage-111\",\"title\":\"Stage #111: Command Propagation\"},{\"slug\":\"hd5\",\"tester_log_prefix\":\"stage-112\",\"title\":\"Stage #112: Command Propagation to multiple Replicas\"},{\"slug\":\"yg4\",\"tester_log_prefix\":\"stage-113\",\"title\":\"Stage #113: Command Processing\"},{\"slug\":\"xv6\",\"tester_log_prefix\":\"stage-114\",\"title\":\"Stage #114: GetAck with 0 offset\"},{\"slug\":\"yd3\",\"tester_log_prefix\":\"stage-115\",\"title\":\"Stage #115: GetAck with non-0 offset\"},{\"slug\":\"my8\",\"tester_log_prefix\":\"stage-116\",\"title\":\"Stage #116: WAIT with 0 replicas\"},{\"slug\":\"tu8\",\"tester_log_prefix\":\"stage-117\",\"title\":\"Stage #117: WAIT with 0 offset\"},{\"slug\":\"na2\",\"tester_log_prefix\":\"stage-118\",\"title\":\"Stage #118: WAIT Command\"}]" \
+ CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"jm1\",\"tester_log_prefix\":\"stage-1\",\"title\":\"Stage #1: Bind to a port\"},{\"slug\":\"rg2\",\"tester_log_prefix\":\"stage-2\",\"title\":\"Stage #2: Respond to PING\"},{\"slug\":\"wy1\",\"tester_log_prefix\":\"stage-3\",\"title\":\"Stage #3: Respond to multiple PINGs\"},{\"slug\":\"zu2\",\"tester_log_prefix\":\"stage-4\",\"title\":\"Stage #4: Handle concurrent clients\"},{\"slug\":\"qq0\",\"tester_log_prefix\":\"stage-5\",\"title\":\"Stage #5: Implement the ECHO command\"},{\"slug\":\"la7\",\"tester_log_prefix\":\"stage-6\",\"title\":\"Stage #6: Implement the SET \u0026 GET commands\"},{\"slug\":\"yz1\",\"tester_log_prefix\":\"stage-7\",\"title\":\"Stage #7: Expiry\"}]" \
+ dist/main.out
+
+test_repl_with_redis: build
+ CODECRAFTERS_SUBMISSION_DIR=./internal/test_helpers/pass_all \
+ CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"bw1\",\"tester_log_prefix\":\"stage-101\",\"title\":\"Stage #101: Replication - Custom Port\"}, {\"slug\":\"ye5\",\"tester_log_prefix\":\"stage-102\",\"title\":\"Stage #102: Replication - Info on Master\"},{\"slug\":\"hc6\",\"tester_log_prefix\":\"stage-103\",\"title\":\"Stage #103: Replication - Info on Replica\"}, {\"slug\":\"xc1\",\"tester_log_prefix\":\"stage-104\",\"title\":\"Stage #104: Replication - Replication ID and Offset\"}, {\"slug\":\"gl7\",\"tester_log_prefix\":\"stage-105\",\"title\":\"Stage #105: Replication - Handshake 1\"},{\"slug\":\"eh4\",\"tester_log_prefix\":\"stage-106\",\"title\":\"Stage #106: Replication - Handshake 2\"},{\"slug\":\"ju6\",\"tester_log_prefix\":\"stage-107\",\"title\":\"Stage #107: Replication - Handshake 3\"},{\"slug\":\"fj0\",\"tester_log_prefix\":\"stage-108\",\"title\":\"Stage #108: Replication - REPLCONF\"},{\"slug\":\"vm3\",\"tester_log_prefix\":\"stage-109\",\"title\":\"Stage #109: Replication - PSYNC\"},{\"slug\":\"cf8\",\"tester_log_prefix\":\"stage-110\",\"title\":\"Stage #110: Replication - PSYNC w RDB file\"},{\"slug\":\"zn8\",\"tester_log_prefix\":\"stage-111\",\"title\":\"Stage #111: Command Propagation\"},{\"slug\":\"hd5\",\"tester_log_prefix\":\"stage-112\",\"title\":\"Stage #112: Command Propagation to multiple Replicas\"},{\"slug\":\"yg4\",\"tester_log_prefix\":\"stage-113\",\"title\":\"Stage #113: Command Processing\"},{\"slug\":\"xv6\",\"tester_log_prefix\":\"stage-114\",\"title\":\"Stage #114: GetAck with 0 offset\"},{\"slug\":\"yd3\",\"tester_log_prefix\":\"stage-115\",\"title\":\"Stage #115: GetAck with non-0 offset\"},{\"slug\":\"my8\",\"tester_log_prefix\":\"stage-116\",\"title\":\"Stage #116: WAIT with 0 replicas\"},{\"slug\":\"tu8\",\"tester_log_prefix\":\"stage-117\",\"title\":\"Stage #117: WAIT with 0 offset\"},{\"slug\":\"na2\",\"tester_log_prefix\":\"stage-118\",\"title\":\"Stage #118: WAIT Command\"}]" \
dist/main.out
test_rdb_with_redis: build
@@ -56,7 +55,14 @@ test_streams_with_redis: build
CODECRAFTERS_TEST_CASES_JSON="[{\"slug\": \"cc3\", \"tester_log_prefix\": \"stage-301\", \"title\": \"stage #01: StreamsType\"},{\"slug\": \"cf6\", \"tester_log_prefix\": \"stage-302\", \"title\": \"stage #02: StreamsXadd\"},{\"slug\": \"hq8\", \"tester_log_prefix\": \"stage-303\", \"title\": \"stage #03: StreamsXaddValidateID\"},{\"slug\": \"yh3\", \"tester_log_prefix\": \"stage-304\", \"title\": \"stage #04: StreamsXaddPartialAutoid\"},{\"slug\": \"xu6\", \"tester_log_prefix\": \"stage-305\", \"title\": \"stage #05: StreamsXaddFullAutoid\"},{\"slug\": \"zx1\", \"tester_log_prefix\": \"stage-306\", \"title\": \"stage #06: StreamsXrange\"},{\"slug\": \"yp1\", \"tester_log_prefix\": \"stage-307\", \"title\": \"stage #07: StreamsXrangeMinID\"},{\"slug\": \"fs1\", \"tester_log_prefix\": \"stage-308\", \"title\": \"stage #08: StreamsXrangeMaxID\"},{\"slug\": \"um0\", \"tester_log_prefix\": \"stage-309\", \"title\": \"stage #09: StreamsXread\"},{\"slug\": \"ru9\", \"tester_log_prefix\": \"stage-310\", \"title\": \"stage #10: StreamsXreadMultiple\"},{\"slug\": \"bs1\", \"tester_log_prefix\": \"stage-311\", \"title\": \"stage #11: StreamsXreadBlock\"},{\"slug\": \"hw1\", \"tester_log_prefix\": \"stage-312\", \"title\": \"stage #12: StreamsXreadBlockNoTimeout\"},{\"slug\": \"xu1\", \"tester_log_prefix\": \"stage-313\", \"title\": \"stage #13: StreamsXreadBlockMaxID\"}]" \
dist/main.out
-test_dev: build
+test_txn_with_redis: build
CODECRAFTERS_SUBMISSION_DIR=./internal/test_helpers/pass_all \
- CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"yg4\",\"tester_log_prefix\":\"stage-113\",\"title\":\"Stage #113: Command Processing\"}]" \
+ CODECRAFTERS_TEST_CASES_JSON="[{\"slug\":\"si4\",\"tester_log_prefix\":\"stage-401\",\"title\":\"Stage #401: INCR-1\"},{\"slug\":\"lz8\",\"tester_log_prefix\":\"stage-402\",\"title\":\"Stage #402: INCR-2\"}, {\"slug\":\"mk1\",\"tester_log_prefix\":\"stage-403\",\"title\":\"Stage #403: INCR-3\"}, {\"slug\":\"pn0\",\"tester_log_prefix\":\"stage-404\",\"title\":\"Stage #404: MULTI\"}, {\"slug\":\"lo4\",\"tester_log_prefix\":\"stage-405\",\"title\":\"Stage #405: EXEC\"}, {\"slug\":\"we1\",\"tester_log_prefix\":\"stage-406\",\"title\":\"Stage #406: Empty Transaction\"}, {\"slug\":\"rs9\",\"tester_log_prefix\":\"stage-407\",\"title\":\"Stage #407: Queueing Commands\"}, {\"slug\":\"fy6\",\"tester_log_prefix\":\"stage-408\",\"title\":\"Stage #408: Executing a transaction\"}, {\"slug\":\"rl9\",\"tester_log_prefix\":\"stage-409\",\"title\":\"Stage #409: Discarding a transaction\"}, {\"slug\":\"sg9\",\"tester_log_prefix\":\"stage-410\",\"title\":\"Stage #410: Executing a failed transaction\"}, {\"slug\":\"jf8\",\"tester_log_prefix\":\"stage-411\",\"title\":\"Stage #411: Executing concurrent transactions\"}]" \
dist/main.out
+
+test_all_with_redis:
+ make test_base_with_redis || true
+ make test_repl_with_redis || true
+ make test_rdb_with_redis || true
+ make test_streams_with_redis || true
+ make test_txn_with_redis || true
diff --git a/internal/resp/value/value.go b/internal/resp/value/value.go
index e1ff45a5..854f07ed 100644
--- a/internal/resp/value/value.go
+++ b/internal/resp/value/value.go
@@ -94,6 +94,13 @@ func (v *Value) Integer() int {
return v.integer
}
+func (v *Value) Error() string {
+ if v.Type == ERROR {
+ return string(v.String())
+ }
+ return ""
+}
+
func (v *Value) FormattedString() string {
switch v.Type {
case SIMPLE_STRING:
diff --git a/internal/resp_assertions/error_assertion.go b/internal/resp_assertions/error_assertion.go
new file mode 100644
index 00000000..3ab6038a
--- /dev/null
+++ b/internal/resp_assertions/error_assertion.go
@@ -0,0 +1,27 @@
+package resp_assertions
+
+import (
+ "fmt"
+
+ resp_value "github.com/codecrafters-io/redis-tester/internal/resp/value"
+)
+
+type ErrorAssertion struct {
+ ExpectedValue string
+}
+
+func NewErrorAssertion(expectedValue string) RESPAssertion {
+ return ErrorAssertion{ExpectedValue: expectedValue}
+}
+
+func (a ErrorAssertion) Run(value resp_value.Value) error {
+ if value.Type != resp_value.ERROR {
+ return fmt.Errorf("Expected error, got %s", value.Type)
+ }
+
+ if value.Error() != a.ExpectedValue {
+ return fmt.Errorf("Expected %q, got %q", a.ExpectedValue, value.Error())
+ }
+
+ return nil
+}
diff --git a/internal/resp_assertions/ordered_array_assertion.go b/internal/resp_assertions/ordered_array_assertion.go
new file mode 100644
index 00000000..ed642ed4
--- /dev/null
+++ b/internal/resp_assertions/ordered_array_assertion.go
@@ -0,0 +1,39 @@
+package resp_assertions
+
+import (
+ "fmt"
+
+ resp_value "github.com/codecrafters-io/redis-tester/internal/resp/value"
+)
+
+// OrderedArrayAssertion : Order of the actual and expected values matters.
+// All RESP values are accepted as elements in this array.
+// We don't alter the ordering.
+// For each element in the array, we run the corresponding assertion.
+type OrderedArrayAssertion struct {
+ ExpectedValue []RESPAssertion
+}
+
+func NewOrderedArrayAssertion(expectedValue []RESPAssertion) RESPAssertion {
+ return OrderedArrayAssertion{ExpectedValue: expectedValue}
+}
+
+func (a OrderedArrayAssertion) 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, assertion := range a.ExpectedValue {
+ actualElement := value.Array()[i]
+
+ if err := assertion.Run(actualElement); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/internal/stages_test.go b/internal/stages_test.go
index ccd68693..da7f4348 100644
--- a/internal/stages_test.go
+++ b/internal/stages_test.go
@@ -89,6 +89,13 @@ func TestStages(t *testing.T) {
StdoutFixturePath: "./test_helpers/fixtures/streams/pass",
NormalizeOutputFunc: normalizeTesterOutput,
},
+ "transactions_pass": {
+ UntilStageSlug: "jf8",
+ CodePath: "./test_helpers/pass_all",
+ ExpectedExitCode: 0,
+ StdoutFixturePath: "./test_helpers/fixtures/transactions/pass",
+ NormalizeOutputFunc: normalizeTesterOutput,
+ },
}
tester_utils_testing.TestTesterOutput(t, testerDefinition, testCases)
diff --git a/internal/test_cases/multi_command_test_case.go b/internal/test_cases/multi_command_test_case.go
new file mode 100644
index 00000000..bf73b59c
--- /dev/null
+++ b/internal/test_cases/multi_command_test_case.go
@@ -0,0 +1,35 @@
+package test_cases
+
+import (
+ "fmt"
+
+ resp_client "github.com/codecrafters-io/redis-tester/internal/resp/connection"
+ "github.com/codecrafters-io/redis-tester/internal/resp_assertions"
+ "github.com/codecrafters-io/tester-utils/logger"
+)
+
+// MultiCommandTestCase is a concise & easier way to define & run multiple SendCommandTestCase
+type MultiCommandTestCase struct {
+ Commands [][]string
+ Assertions []resp_assertions.RESPAssertion
+}
+
+func (t *MultiCommandTestCase) RunAll(client *resp_client.RespConnection, logger *logger.Logger) error {
+ if len(t.Assertions) != len(t.Commands) {
+ return fmt.Errorf("CodeCrafters internal error. Number of commands and assertions should be equal in MultiCommandTestCase")
+ }
+
+ for i, command := range t.Commands {
+ setCommandTestCase := SendCommandTestCase{
+ Command: command[0],
+ Args: command[1:],
+ Assertion: t.Assertions[i],
+ }
+
+ if err := setCommandTestCase.Run(client, logger); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/internal/test_cases/transaction_test_case.go b/internal/test_cases/transaction_test_case.go
new file mode 100644
index 00000000..c562cca7
--- /dev/null
+++ b/internal/test_cases/transaction_test_case.go
@@ -0,0 +1,89 @@
+package test_cases
+
+import (
+ resp_client "github.com/codecrafters-io/redis-tester/internal/resp/connection"
+ "github.com/codecrafters-io/redis-tester/internal/resp_assertions"
+ "github.com/codecrafters-io/tester-utils/logger"
+)
+
+// TransactionTestCase is a test case where we initiate a transaction by sending "MULTI" command
+// Send a series of commands to the server expected back "QUEUED" for each command
+// Finally send "EXEC" command and expect the response to be the same as ExpectedResponseArray
+//
+// RunAll will run all the steps in the Transaction execution. Alternatively, you
+// can run each step individually.
+type TransactionTestCase struct {
+ // All the CommandQueue will be sent in order to client
+ // And a string "QUEUED" will be expected
+ CommandQueue [][]string
+
+ // After queueing all the commands,
+ // if "EXEC" is sent (based on which function is called)
+ // The elements in the response array are asserted based on the
+ // assertions in the ExpectedResponseArray
+ ExpectedResponseArray []resp_assertions.RESPAssertion
+}
+
+func (t TransactionTestCase) RunAll(client *resp_client.RespConnection, logger *logger.Logger) error {
+ if err := t.RunMulti(client, logger); err != nil {
+ return err
+ }
+
+ if err := t.RunQueueAll(client, logger); err != nil {
+ return err
+ }
+
+ if err := t.RunExec(client, logger); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (t TransactionTestCase) RunWithoutExec(client *resp_client.RespConnection, logger *logger.Logger) error {
+ if err := t.RunMulti(client, logger); err != nil {
+ return err
+ }
+
+ if err := t.RunQueueAll(client, logger); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (t TransactionTestCase) RunMulti(client *resp_client.RespConnection, logger *logger.Logger) error {
+ commandTest := SendCommandTestCase{
+ Command: "MULTI",
+ Args: []string{},
+ Assertion: resp_assertions.NewStringAssertion("OK"),
+ }
+
+ return commandTest.Run(client, logger)
+}
+
+func (t TransactionTestCase) RunQueueAll(client *resp_client.RespConnection, logger *logger.Logger) error {
+ for i, v := range t.CommandQueue {
+ logger.Debugf("Sending command: #%d/#%d", i+1, len(t.CommandQueue))
+ commandTest := SendCommandTestCase{
+ Command: v[0],
+ Args: v[1:],
+ Assertion: resp_assertions.NewStringAssertion("QUEUED"),
+ }
+ if err := commandTest.Run(client, logger); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (t TransactionTestCase) RunExec(client *resp_client.RespConnection, logger *logger.Logger) error {
+ setCommandTestCase := SendCommandTestCase{
+ Command: "EXEC",
+ Args: []string{},
+ Assertion: resp_assertions.NewOrderedArrayAssertion(t.ExpectedResponseArray),
+ }
+
+ return setCommandTestCase.Run(client, logger)
+}
diff --git a/internal/test_helpers/course_definition.yml b/internal/test_helpers/course_definition.yml
index 1151a765..79835f3b 100644
--- a/internal/test_helpers/course_definition.yml
+++ b/internal/test_helpers/course_definition.yml
@@ -89,9 +89,20 @@ extensions:
[xadd-command]: https://redis.io/commands/xadd/
[xrange-command]: https://redis.io/commands/xrange/
+ - slug: "transactions"
+ name: "Transactions"
+ description_markdown: |-
+ In this challenge extension you'll add support for [Transactions][redis-transactions] to your Redis implementation.
+
+ Along the way, you'll learn about the [MULTI][multi-command], [EXEC][exec-command], and [DISCARD][discard-command] commands, as well as how Redis handles transactions atomically.
+
+ [redis-transactions]: https://redis.io/docs/latest/develop/interact/transactions/
+ [multi-command]: https://redis.io/commands/multi/
+ [exec-command]: https://redis.io/commands/exec/
+ [discard-command]: https://redis.io/commands/discard/
+
stages:
- - legacy_slug: "init"
- slug: "jm1"
+ - slug: "jm1"
concept_slugs:
[
"network-protocols",
@@ -130,8 +141,7 @@ stages:
default port that Redis uses.
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_bind.go#L11"
- - legacy_slug: "ping-pong"
- slug: "rg2"
+ - slug: "rg2"
concept_slugs:
[
"network-protocols",
@@ -183,8 +193,7 @@ stages:
protocol](https://redis.io/topics/protocol) to encode the reply.
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_ping_pong.go#L9"
- - legacy_slug: "ping-pong-multiple"
- slug: "wy1"
+ - slug: "wy1"
concept_slugs:
[
"network-protocols",
@@ -240,8 +249,7 @@ stages:
[PING](https://redis.io/commands/ping) commands sent by the same client.
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_ping_pong.go#L35"
- - legacy_slug: "concurrent-clients"
- slug: "zu2"
+ - slug: "zu2"
concept_slugs:
[
"network-protocols",
@@ -301,8 +309,7 @@ stages:
like the official Redis implementation does.
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_ping_pong.go#L56"
- - legacy_slug: "echo"
- slug: "qq0"
+ - slug: "qq0"
name: "Implement the ECHO command"
difficulty: medium
description_md: |-
@@ -349,9 +356,7 @@ stages:
specification](https://redis.io/topics/protocol).
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_echo.go#L11"
- # TODO: Change this to use hyphens
- - legacy_slug: "set_get"
- slug: "la7"
+ - slug: "la7"
name: "Implement the SET & GET commands"
difficulty: medium
description_md: |-
@@ -405,8 +410,7 @@ stages:
[GET](https://redis.io/commands/get) commands.
tester_source_code_url: "https://github.com/codecrafters-io/redis-tester/blob/a58b9d58b33870fe26a164c0e323f809275a7250/internal/test_get_set.go#L11"
- - legacy_slug: "expiry"
- slug: "yz1"
+ - slug: "yz1"
name: "Expiry"
difficulty: medium
description_md: |-
@@ -468,8 +472,7 @@ stages:
# Persistence
- - legacy_slug: "rdb-config"
- slug: "zg5"
+ - slug: "zg5"
primary_extension_slug: "persistence-rdb"
name: "RDB file config"
difficulty: easy
@@ -482,14 +485,14 @@ stages:
An RDB file is a point-in-time snapshot of a Redis dataset. When RDB persistence is enabled, the Redis server syncs its in-memory state with an RDB file, by doing the following:
- 1. On startup, the Redis server loads the data from the RDB file.
- 2. While running, the Redis server periodically takes new snapshots of the dataset, in order to update the RDB file.
+ 1. On startup, the Redis server loads the data from the RDB file.
+ 2. While running, the Redis server periodically takes new snapshots of the dataset, in order to update the RDB file.
- ### `dir` and `dbfilename`
+ ### `dir` and `dbfilename`
The configuration parameters `dir` and `dbfilename` specify where an RDB file is stored:
- - `dir` - the path to the directory where the RDB file is stored (example: `/tmp/redis-data`)
- - `dbfilename` - the name of the RDB file (example: `rdbfile`)
+ - `dir` - the path to the directory where the RDB file is stored (example: `/tmp/redis-data`)
+ - `dbfilename` - the name of the RDB file (example: `rdbfile`)
### The `CONFIG GET` command
@@ -522,8 +525,8 @@ stages:
Your server must respond to each `CONFIG GET` command with a RESP array containing two elements:
- 1. The parameter **name**, encoded as a [RESP Bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings)
- 2. The parameter **value**, encoded as a RESP Bulk string
+ 1. The parameter **name**, encoded as a [RESP Bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings)
+ 2. The parameter **value**, encoded as a RESP Bulk string
For example, if the value of `dir` is `/tmp/redis-files`, then the expected response to `CONFIG GET dir` is:
@@ -533,57 +536,236 @@ stages:
### Notes
- 1. You don't need to read the RDB file in this stage, you only need to store `dir` and `dbfilename`. Reading from the file will be covered in later stages.
- 2. If your repository was created before 5th Oct 2023, it's possible that your `./spawn_redis_server.sh` script is not passing arguments to your program. To fix this, you'll need to edit `./spawn_redis_server.sh`. Check the [update CLI args PR](https://github.com/codecrafters-io/build-your-own-redis/pull/89/files) for details on how to do this.
+ - You don't need to read the RDB file in this stage, you only need to store `dir` and `dbfilename`. Reading from the file will be covered in later stages.
+ - If your repository was created before 5th Oct 2023, it's possible that your `./spawn_redis_server.sh` script is not passing arguments to your program. To fix this, you'll need to edit `./spawn_redis_server.sh`. Check the [update CLI args PR](https://github.com/codecrafters-io/build-your-own-redis/pull/89/files) for details on how to do this.
marketing_md: |
In this stage, you'll add support for reading the config values related to where RDB files are stored. You'll implement the `CONFIG GET` command.
- - legacy_slug: "rdb-read-key"
- slug: "jz6"
+ - slug: "jz6"
primary_extension_slug: "persistence-rdb"
name: "Read a key"
difficulty: medium
description_md: |
- In this stage, you'll add support for reading a key from an RDB file.
+ In this stage, you'll add support for reading a single key from an RDB file.
+
+ ### RDB file format
+
+
+ Click to expand/collapse
+ #### RDB file format overview
- To keep things simple, we'll start out by supporting RDB files that contain a single key.
+ Here are the different sections of the RDB file, in order:
- Jan-Erik Rediger (author of [rdb-rs](https://rdb.fnordig.de/)) has a great [write-up](https://rdb.fnordig.de/file_format.html)
- that explains the RDB file format in detail. We recommend using it as a reference when working on this stage.
+ 1. Header section
+ 2. Metadata section
+ 3. Database section
+ 4. End of file section
- The tester will create an RDB file with a single key and execute your program like this:
+ RDB files use special encodings to store different types of data. The ones relevant to this stage are "size encoding" and "string encoding." These are explained near the end of this page.
+
+ The following breakdown of the RDB file format is based on [Redis RDB File Format](https://rdb.fnordig.de/file_format.html) by Jan-Erik Rediger. We’ve only included the parts that are relevant to this stage.
+
+ #### Header section
+ RDB files begin with a header section, which looks something like this:
```
- ./spawn_redis_server.sh --dir --dbfilename
+ 52 45 44 49 53 30 30 30 37 // Magic string + version number (ASCII): "REDIS0007".
```
- It'll then send a `KEYS *` command to your server.
+ The header contains the magic string `REDIS`, followed by a four-character RDB version number. In this challenge, the test RDB files all use version 7. So, the header is always `REDIS0007`.
- ```bash
+ #### Metadata section
+
+ Next is the metadata section. It contains zero or more "metadata subsections," which each specify a single metadata attribute. Here's an example of a metadata subsection that specifies `redis-ver`:
+ ```
+ FA // Indicates the start of a metadata subsection.
+ 09 72 65 64 69 73 2D 76 65 72 // The name of the metadata attribute (string encoded): "redis-ver".
+ 06 36 2E 30 2E 31 36 // The value of the metadata attribute (string encoded): "6.0.16".
+ ```
+
+ The metadata name and value are always string encoded.
+
+ #### Database section
+
+ Next is the database section. It contains zero or more "database subsections," which each describe a single database. Here's an example of a database subsection:
+ ```
+ FE // Indicates the start of a database subsection.
+ 00 /* The index of the database (size encoded).
+ Here, the index is 0. */
+
+ FB // Indicates that hash table size information follows.
+ 02 /* The size of the hash table that stores the keys and values (size encoded).
+ Here, the key-value hash table size is 2. */
+ 01 /* The size of the hash table that stores the expires of the keys (size encoded).
+ Here, the expire hash table size is 1. */
+
+ 00 /* The 1-byte flag that specifies the value’s type and encoding.
+ Here, the flag is 0, which means "string." */
+ 06 66 6F 6F 62 61 72 // The name of the key (string encoded). Here, it's "foobar".
+ 06 62 61 7A 71 75 78 // The value (string encoded). Here, it's "bazqux".
+
+ FC /* Indicates that this key has an expire,
+ and that the expire timestamp is expressed in milliseconds. */
+ 15 72 E7 07 8F 01 00 00 /* The expire timestamp, expressed in Unix time,
+ stored as an 8-byte unsigned long, in little-endian (read right-to-left).
+ Here, the expire timestamp is 1713824559637. */
+ 00 // Value type is string.
+ 03 66 6F 6F // Key name is "foo".
+ 03 62 61 72 // Value is "bar".
+
+ FD /* Indicates that this key has an expire,
+ and that the expire timestamp is expressed in seconds. */
+ 52 ED 2A 66 /* The expire timestamp, expressed in Unix time,
+ stored as an 4-byte unsigned integer, in little-endian (read right-to-left).
+ Here, the expire timestamp is 1714089298. */
+ 00 // Value type is string.
+ 03 62 61 7A // Key name is "baz".
+ 03 71 75 78 // Value is "qux".
+ ```
+
+ Here's a more formal description of how each key-value pair is stored:
+
+ 1. Optional expire information (one of the following):
+ * Timestamp in seconds:
+ 1. `FD`
+ 2. Expire timestamp in seconds (4-byte unsigned integer)
+ * Timestamp in milliseconds:
+ 1. `FC`
+ 2. Expire timestamp in milliseconds (8-byte unsigned long)
+ 2. Value type (1-byte flag)
+ 3. Key (string encoded)
+ 4. Value (encoding depends on value type)
+
+ #### End of file section
+
+ This section marks the end of the file. It looks something like this:
+ ```
+ FF /* Indicates that the file is ending,
+ and that the checksum follows. */
+ 89 3b b7 4e f8 0f 77 19 // An 8-byte CRC64 checksum of the entire file.
+ ```
+
+ #### Size encoding
+
+ Size-encoded values specify the size of something. Here are some examples:
+ - The database indexes and hash table sizes are size encoded.
+ - String encoding begins with a size-encoded value that specifies the number of characters in the string.
+ - List encoding begins with a size-encoded value that specifies the number of elements in the list.
+
+ The first two bits of a size-encoded value indicate how the value should be parsed. Here's a guide (bits are shown in both hexadecimal and binary):
+ ```
+ /* If the first two bits are 0b00:
+ The size is the remaining 6 bits of the byte.
+ In this example, the size is 10: */
+ 0A
+ 00001010
+
+ /* If the first two bits are 0b01:
+ The size is the next 14 bits
+ (remaining 6 bits in the first byte, combined with the next byte),
+ in big-endian (read left-to-right).
+ In this example, the size is 700: */
+ 42 BC
+ 01000010 10111100
+
+ /* If the first two bits are 0b10:
+ Ignore the remaining 6 bits of the first byte.
+ The size is the next 4 bytes, in big-endian (read left-to-right).
+ In this example, the size is 17000: */
+ 80 00 00 42 68
+ 10000000 00000000 00000000 01000010 01101000
+
+ /* If the first two bits are 0b11:
+ The remaining 6 bits specify a type of string encoding.
+ See string encoding section. */
+ ```
+
+ #### String encoding
+
+ A string-encoded value consists of two parts:
+ 1. The size of the string (size encoded).
+ 2. The string.
+
+ Here's an example:
+ ```
+ /* The 0x0D size specifies that the string is 13 characters long.
+ The remaining characters spell out "Hello, World!". */
+ 0D 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21
+ ```
+
+ For sizes that begin with `0b11`, the remaining 6 bits indicate a type of string format:
+ ```
+ /* The 0xC0 size indicates the string is an 8-bit integer.
+ In this example, the string is "123". */
+ C0 7B
+
+ /* The 0xC1 size indicates the string is a 16-bit integer.
+ The remaining bytes are in little-endian (read right-to-left).
+ In this example, the string is "12345". */
+ C1 39 30
+
+ /* The 0xC2 size indicates the string is a 32-bit integer.
+ The remaining bytes are in little-endian (read right-to-left),
+ In this example, the string is "1234567". */
+ C2 87 D6 12 00
+
+ /* The 0xC3 size indicates that the string is compressed with the LZF algorithm.
+ You will not encounter LZF-compressed strings in this challenge. */
+ C3 ...
+ ```
+
+
+
+ ### The `KEYS` command
+
+ Click to expand/collapse
+
+ The [`KEYS command`](https://redis.io/docs/latest/commands/keys/) returns all the keys that match a given pattern, as a RESP array:
+ ```
+ $ redis-cli SET foo bar
+ OK
+ $ redis-cli SET baz qux
+ OK
+ $ redis-cli KEYS "f*"
+ 1) "foo"
+ ```
+
+ When the pattern is `*`, the command returns all the keys in the database:
+ ```
$ redis-cli KEYS "*"
+ 1) "baz"
+ 2) "foo"
```
- The response to `KEYS *` should be a RESP array with one element: the key.
+ In this stage, you must add support for the `KEYS` command. However, you only need to support the `*` pattern.
+
+
+ ### Tests
- For example, let's say the RDB file contains a key called `foo`. The expected response will be:
+ The tester will create an RDB file with a single key and execute your program like this:
+ ```
+ $ ./spawn_redis_server.sh --dir
--dbfilename
+ ```
+ It'll then send a `KEYS "*"` command to your server.
```
- *1\r\n$3\r\nfoo\r\n
+ $ redis-cli KEYS "*"
```
- - `*1\r\n` indicates that the array has one element
- - `$3\r\nfoo\r\n` indicates that the first element is a bulk string with the value `foo`
+ Your server must respond with a RESP array that contains the key from the RDB file:
+ ```
+ *1\r\n$3\r\nfoo\r\n
+ ```
- **Note**: Remember, in this stage you only need to support RDB files that contain a single key, and you can ignore the value of the key. We'll
- get to handling multiple keys and reading values in later stages.
+ ### Notes
- **Note**: The `.rdb` file provided via `--dir`/`--dbfilename` might not exist. If the file doesn't exist, your program must treat it as if the database
- is currently empty.
+ - The RDB file provided by `--dir` and `--dbfilename` might not exist. If the file doesn't exist, your program must treat the database as empty.
+ - RDB files use both little-endian and big-endian to store numbers. See the [MDN article on endianness](https://developer.mozilla.org/en-US/docs/Glossary/Endianness) to learn more.
+ - To generate an RDB file, use the [`SAVE` command](https://redis.io/docs/latest/commands/save/).
marketing_md: |
In this stage, you'll add support for reading a key from an RDB file that contains a single key-value pair. You'll do this by implementing the `KEYS *` command.
- - legacy_slug: "rdb-read-string-value"
- slug: "gc6"
+ - slug: "gc6"
primary_extension_slug: "persistence-rdb"
name: "Read a string value"
difficulty: medium
@@ -620,8 +802,7 @@ stages:
marketing_md: |
In this stage, you'll add support for reading the value of a key from an RDB file that contains a single key-value pair.
- - legacy_slug: "rdb-read-multiple-keys"
- slug: "jw4"
+ - slug: "jw4"
primary_extension_slug: "persistence-rdb"
name: "Read multiple keys"
difficulty: medium
@@ -654,8 +835,7 @@ stages:
marketing_md: |
In this stage, you'll add support for reading multiple keys from an RDB file. You'll do this by extending the `KEYS *` command to support multiple keys.
- - legacy_slug: "rdb-read-multiple-string-values"
- slug: "dq3"
+ - slug: "dq3"
primary_extension_slug: "persistence-rdb"
name: "Read multiple string values"
difficulty: medium
@@ -679,8 +859,7 @@ stages:
marketing_md: |
In this stage, you'll add support for reading multiple string values from an RDB file.
- - legacy_slug: "rdb-read-value-with-expiry"
- slug: "sm4"
+ - slug: "sm4"
primary_extension_slug: "persistence-rdb"
name: "Read value with expiry"
difficulty: medium
@@ -711,8 +890,7 @@ stages:
# Replication
- - legacy_slug: "repl-custom-port"
- slug: "bw1"
+ - slug: "bw1"
primary_extension_slug: "replication"
name: "Configure listening port"
difficulty: easy
@@ -746,8 +924,7 @@ stages:
marketing_md: |
In this stage, you'll add support for parsing the `--port` flag and starting Redis on a custom port.
- - legacy_slug: "repl-info"
- slug: "ye5"
+ - slug: "ye5"
primary_extension_slug: "replication"
name: "The INFO command"
difficulty: easy
@@ -814,8 +991,7 @@ stages:
marketing_md: |
In this stage, you'll add support for the INFO command on the master.
- - legacy_slug: "repl-info-replica"
- slug: "hc6"
+ - slug: "hc6"
primary_extension_slug: "replication"
name: "The INFO command on a replica"
difficulty: medium
@@ -863,8 +1039,7 @@ stages:
marketing_md: |
In this stage, you'll add support for the --replicaof arg and INFO command on the replica.
- - legacy_slug: "repl-id"
- slug: "xc1"
+ - slug: "xc1"
primary_extension_slug: "replication"
name: "Initial Replication ID and Offset"
difficulty: easy
@@ -915,8 +1090,7 @@ stages:
marketing_md: |
In this stage, you'll add support for reading a key from an RDB file that contains a single key-value pair. You'll do this by implementing the `KEYS *` command.
- - legacy_slug: "repl-replica-ping"
- slug: "gl7"
+ - slug: "gl7"
primary_extension_slug: "replication"
name: "Send handshake (1/3)"
difficulty: easy
@@ -951,8 +1125,7 @@ stages:
marketing_md: |
In this stage, you'll add support for starting the handshake from the Replica side.
- - legacy_slug: "repl-replica-replconf"
- slug: "eh4"
+ - slug: "eh4"
primary_extension_slug: "replication"
name: "Send handshake (2/3)"
difficulty: easy
@@ -1009,8 +1182,7 @@ stages:
marketing_md: |
In this stage, you'll add support for continuing the handshake from the Replica side, by sending REPLCONF.
- - legacy_slug: "repl-replica-psync"
- slug: "ju6"
+ - slug: "ju6"
primary_extension_slug: "replication"
name: "Send handshake (3/3)"
difficulty: medium
@@ -1067,8 +1239,7 @@ stages:
marketing_md: |
In this stage, you'll add support for finishing the handshake from the Replica side, by sending PSYNC.
- - legacy_slug: "repl-master-replconf"
- slug: "fj0"
+ - slug: "fj0"
primary_extension_slug: "replication"
name: "Receive handshake (1/2)"
difficulty: easy
@@ -1107,8 +1278,7 @@ stages:
marketing_md: |
In this stage, you'll add support for starting the handshake from the master side, by accepting REPLCONF.
- - legacy_slug: "repl-master-psync"
- slug: "vm3"
+ - slug: "vm3"
primary_extension_slug: "replication"
name: "Receive handshake (2/2)"
difficulty: easy
@@ -1167,8 +1337,7 @@ stages:
marketing_md: |
In this stage, you'll add support for accepting PSYNC, and starting a FULLRESYNC.
- - legacy_slug: "repl-master-psync-rdb"
- slug: "cf8"
+ - slug: "cf8"
primary_extension_slug: "replication"
name: "Empty RDB Transfer"
difficulty: easy
@@ -1229,8 +1398,7 @@ stages:
marketing_md: |
In this stage, you'll add support for sending an empty RDB file to the replica. This is part of the "full resynchronization" process.
- - legacy_slug: "repl-master-cmd-prop"
- slug: "zn8"
+ - slug: "zn8"
primary_extension_slug: "replication"
name: "Single-replica propagation"
difficulty: medium
@@ -1300,8 +1468,7 @@ stages:
marketing_md: |
In this stage, you'll add support for finishing the sync handshake from the master side, by sending a RDB file.
- - legacy_slug: "repl-multiple-replicas"
- slug: "hd5"
+ - slug: "hd5"
primary_extension_slug: "replication"
name: "Multi Replica Command Propagation"
difficulty: hard
@@ -1337,8 +1504,7 @@ stages:
marketing_md: |
In this stage, you'll complete your implementation of Redis replication.
- - legacy_slug: "repl-cmd-processing"
- slug: "yg4"
+ - slug: "yg4"
primary_extension_slug: "replication"
name: "Command Processing"
difficulty: hard
@@ -1387,8 +1553,7 @@ stages:
marketing_md: |
In this stage, you'll add support for processing commands received by the replica from the master.
- - legacy_slug: "repl-replica-getack"
- slug: "xv6"
+ - slug: "xv6"
primary_extension_slug: "replication"
name: "ACKs with no commands"
difficulty: easy
@@ -1455,8 +1620,7 @@ stages:
marketing_md: |
In this stage, you'll add support for returning an ACK back to master as a response to GETACK.
- - legacy_slug: "repl-replica-getack-nonzero"
- slug: "yd3"
+ - slug: "yd3"
primary_extension_slug: "replication"
name: "ACKs with commands"
difficulty: medium
@@ -1531,8 +1695,7 @@ stages:
marketing_md: |
In this stage, you'll add support for returning an ACK back to master as a response to GETACK.
- - legacy_slug: "repl-wait-zero-replicas"
- slug: "my8"
+ - slug: "my8"
primary_extension_slug: "replication"
name: "WAIT with no replicas"
difficulty: medium
@@ -1569,8 +1732,7 @@ stages:
marketing_md: |
In this stage, you'll start implementing the WAIT command on your master.
- - legacy_slug: "repl-wait-zero-offset"
- slug: "tu8"
+ - slug: "tu8"
primary_extension_slug: "replication"
name: "WAIT with no commands"
difficulty: medium
@@ -1611,8 +1773,7 @@ stages:
marketing_md: |
In this stage, you'll continue implementing the WAIT command on your master.
- - legacy_slug: "repl-wait"
- slug: "na2"
+ - slug: "na2"
primary_extension_slug: "replication"
name: "WAIT with multiple commands"
difficulty: hard
@@ -1654,8 +1815,8 @@ stages:
In this stage, you'll finish implementing the WAIT command on your master.
# Streams
- - legacy_slug: "streams-type"
- slug: "cc3"
+
+ - slug: "cc3"
primary_extension_slug: "streams"
name: "The TYPE command"
difficulty: easy
@@ -1722,8 +1883,7 @@ stages:
marketing_md: |
In this stage, you'll add support for the `TYPE` command.
- - legacy_slug: "streams-xadd"
- slug: "cf6"
+ - slug: "cf6"
primary_extension_slug: "streams"
name: "Create a stream"
difficulty: medium
@@ -1803,8 +1963,7 @@ stages:
marketing_md: |
In this stage, you'll add support for creating a [Redis stream](https://redis.io/docs/data-types/streams/) using the `XADD` command.
- - legacy_slug: "streams-xadd-validate-id"
- slug: "hq8"
+ - slug: "hq8"
primary_extension_slug: "streams"
name: "Validating entry IDs"
difficulty: easy
@@ -1923,8 +2082,7 @@ stages:
marketing_md: |
In this stage, you'll enhance the `XADD` command by extending support for explicit IDs.
- - legacy_slug: "streams-xadd-partial-autoid"
- slug: "yh3"
+ - slug: "yh3"
primary_extension_slug: "streams"
name: "Partially auto-generated IDs"
difficulty: medium
@@ -1995,8 +2153,7 @@ stages:
marketing_md: |
In this stage, you'll enhance the `XADD` command by adding the option to use `*` as the sequence number.
- - legacy_slug: "streams-xadd-full-autoid"
- slug: "xu6"
+ - slug: "xu6"
primary_extension_slug: "streams"
name: "Fully auto-generated IDs"
difficulty: medium
@@ -2042,8 +2199,7 @@ stages:
marketing_md: |
In this stage, you'll enhance the `XADD` command by adding the option to use `*` as the entry ID.
- - legacy_slug: "streams-xrange"
- slug: "zx1"
+ - slug: "zx1"
primary_extension_slug: "streams"
name: "Query entries from stream"
difficulty: medium
@@ -2186,8 +2342,7 @@ stages:
marketing_md: |
In this stage, you'll add support for querying data from a stream using the `XRANGE` command.
- - legacy_slug: "streams-xrange-min-id"
- slug: "yp1"
+ - slug: "yp1"
primary_extension_slug: "streams"
name: "Query with -"
difficulty: easy
@@ -2276,8 +2431,7 @@ stages:
marketing_md: |
In this stage, you'll extend support for `XRANGE` to allow querying using `-`.
- - legacy_slug: "streams-xrange-max-id"
- slug: "fs1"
+ - slug: "fs1"
primary_extension_slug: "streams"
name: "Query with +"
difficulty: easy
@@ -2376,8 +2530,7 @@ stages:
marketing_md: |
In this stage, you'll extend support for `XRANGE` to allow querying using `+`.
- - legacy_slug: "streams-xread"
- slug: "um0"
+ - slug: "um0"
primary_extension_slug: "streams"
name: "Query single stream using XREAD"
difficulty: medium
@@ -2524,8 +2677,7 @@ stages:
marketing_md: |
In this stage, you'll add support to querying a stream using the `XREAD` command.
- - legacy_slug: "streams-xread-multiple"
- slug: "ru9"
+ - slug: "ru9"
primary_extension_slug: "streams"
name: "Query multiple streams using XREAD"
difficulty: medium
@@ -2611,8 +2763,7 @@ stages:
marketing_md: |
In this stage, you'll add extend support to `XREAD` to allow querying multiple streams.
- - legacy_slug: "streams-xread-block"
- slug: "bs1"
+ - slug: "bs1"
primary_extension_slug: "streams"
name: "Blocking reads"
difficulty: hard
@@ -2752,8 +2903,7 @@ stages:
marketing_md: |
In this stage, you'll add extend support to `XREAD` to allow querying multiple streams.
- - legacy_slug: "streams-xread-block-no-timeout"
- slug: "hw1"
+ - slug: "hw1"
primary_extension_slug: "streams"
name: "Blocking reads without timeout"
difficulty: medium
@@ -2870,8 +3020,7 @@ stages:
marketing_md: |
In this stage, you'll add extend support to `XREAD` to allow for the blocking command not timing out.
- - legacy_slug: "streams-xread-block-max-id"
- slug: "xu1"
+ - slug: "xu1"
primary_extension_slug: "streams"
name: "Blocking reads using $"
difficulty: easy
@@ -3006,3 +3155,313 @@ stages:
- In the response, the items are separated onto new lines for readability. The tester expects all of these to be in one line.
marketing_md: |
In this stage, you'll add extend support to `XREAD` to allow for passing in `$` as the ID for a blocking command.
+
+ # Transactions
+
+ - slug: "si4"
+ primary_extension_slug: "transactions"
+ name: "INCR Command (1/3)"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli SET foo 41
+ > INCR foo
+ ```
+
+ marketing_md: |
+ In this stage, you'll start implementing the INCR command.
+
+ - slug: "lz8"
+ primary_extension_slug: "transactions"
+ name: "INCR Command (2/3)"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli INCR foo
+ > INCR bar
+ ```
+
+ marketing_md: |
+ In this stage, you'll continue implementing the INCR command.
+
+ - slug: "mk1"
+ primary_extension_slug: "transactions"
+ name: "INCR Command (3/3)"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli SET foo xyz
+ > INCR foo
+ ```
+
+ marketing_md: |
+ In this stage, you'll finish implementing the INCR command.
+
+ - slug: "pn0"
+ primary_extension_slug: "transactions"
+ name: "MULTI Command"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli MULTI
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement the MULTI command.
+
+ - slug: "lo4"
+ primary_extension_slug: "transactions"
+ name: "EXEC Command"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli EXEC
+ ```
+
+ marketing_md: |
+ In this stage, you'll start implementing the EXEC command.
+
+ - slug: "we1"
+ primary_extension_slug: "transactions"
+ name: "Empty transaction"
+ difficulty: hard
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli MULTI
+ > EXEC
+ > EXEC
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement an empty transaction.
+
+ - slug: "rs9"
+ primary_extension_slug: "transactions"
+ name: "Queueing Commands"
+ difficulty: medium
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli MULTI
+ > SET foo 41
+ > INCR foo
+ ```
+
+ The tester will then create another connection to your master as a Redis client, and send a single command:
+
+ ```bash
+ $ redis-cli GET foo
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement queueing commands to a transaction.
+
+ - slug: "fy6"
+ primary_extension_slug: "transactions"
+ name: "Executing a transaction"
+ difficulty: hard
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli MULTI
+ > SET foo 6
+ > INCR foo
+ > INCR bar
+ > GET bar
+ > EXEC
+ ```
+
+ The tester will then create another connection to your master as a Redis client, and send a single command:
+
+ ```bash
+ $ redis-cli GET foo
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement executing a successful transaction.
+
+ - slug: "rl9"
+ primary_extension_slug: "transactions"
+ name: "DISCARD Command"
+ difficulty: easy
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli MULTI
+ > SET foo 41
+ > INCR foo
+ > DISCARD
+ > GET foo
+ > GET bar
+ > DISCARD
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement the DISCARD command.
+
+ - slug: "sg9"
+ primary_extension_slug: "transactions"
+ name: "Failures within transactions"
+ difficulty: medium
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as a Redis client, and send multiple commands using the same connection:
+
+ ```bash
+ $ redis-cli SET foo abc
+ > SET bar 7
+ > MULTI
+ > INCR foo
+ > INCR bar
+ > EXEC
+ ```
+
+ The tester will then create another connection to your master as a Redis client, and send a single command:
+
+ ```bash
+ $ redis-cli GET foo
+ > GET bar
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement handling failures while executing a transaction.
+
+ - slug: "jf8"
+ primary_extension_slug: "transactions"
+ name: "Multiple transactions"
+ difficulty: medium
+ description_md: |
+ **🚧 We're still working on instructions for this stage**. You can find notes on how the tester works below.
+
+ ### Tests
+
+ The tester will execute your program as a master like this:
+
+ ```
+ ./spawn_redis_server.sh
+ ```
+
+ The tester will then connect to your master as multiple Redis clients, and send multiple commands from each connection:
+
+ ```bash
+ $ redis-cli MULTI
+ > INCR foo
+ > EXEC
+ ```
+
+ marketing_md: |
+ In this stage, you'll implement multiple concurrent transactions.
diff --git a/internal/test_helpers/fixtures/expiry/pass b/internal/test_helpers/fixtures/expiry/pass
index c6c28831..50cac706 100644
--- a/internal/test_helpers/fixtures/expiry/pass
+++ b/internal/test_helpers/fixtures/expiry/pass
@@ -7,15 +7,15 @@ Debug = true
[33m[stage-7] [0m[36mReceived bytes: "+OK\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP simple string: "OK"[0m
[33m[stage-7] [0m[92mReceived "OK"[0m
-[33m[stage-7] [0m[92mReceived OK at 20:00:25.321[0m
-[33m[stage-7] [0m[94mFetching key "apple" at 20:00:25.321 (should not be expired)[0m
+[33m[stage-7] [0m[92mReceived OK at 13:28:48.453[0m
+[33m[stage-7] [0m[94mFetching key "apple" at 13:28:48.454 (should not be expired)[0m
[33m[stage-7] [0m[94m> GET apple[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$9\r\nblueberry\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP bulk string: "blueberry"[0m
[33m[stage-7] [0m[92mReceived "blueberry"[0m
[33m[stage-7] [0m[36mSleeping for 101ms[0m
-[33m[stage-7] [0m[94mFetching key "apple" at 20:00:25.425 (should be expired)[0m
+[33m[stage-7] [0m[94mFetching key "apple" at 13:28:48.557 (should be expired)[0m
[33m[stage-7] [0m[94m> GET apple[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$-1\r\n"[0m
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 92ee3ff4..b9030dd6 100644
--- a/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass
+++ b/internal/test_helpers/fixtures/rdb-read-value-with-expiry/pass
@@ -1,7 +1,7 @@
Debug = true
[33m[stage-13] [0m[94mRunning tests for Stage #13: sm4[0m
-[33m[stage-13] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles4019289137 --dbfilename pear.rdb[0m
+[33m[stage-13] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2566692571 --dbfilename pear.rdb[0m
[33m[stage-13] [0m[94mclient: $ redis-cli GET orange[0m
[33m[stage-13] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$6\r\norange\r\n"[0m
[33m[stage-13] [0m[36mclient: Received bytes: "$10\r\nstrawberry\r\n"[0m
@@ -23,7 +23,7 @@ Debug = true
[33m[stage-12] [0m[94mRunning tests for Stage #12: dq3[0m
[33m[stage-12] [0m[94mCreated RDB file with key-value pairs: "grape"="pineapple", "apple"="raspberry", "banana"="apple", "mango"="orange", "orange"="pear"[0m
-[33m[stage-12] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles117344466 --dbfilename raspberry.rdb[0m
+[33m[stage-12] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3581289170 --dbfilename raspberry.rdb[0m
[33m[stage-12] [0m[94mclient: $ redis-cli GET grape[0m
[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\ngrape\r\n"[0m
[33m[stage-12] [0m[36mclient: Received bytes: "$9\r\npineapple\r\n"[0m
@@ -55,19 +55,19 @@ Debug = true
[33m[stage-11] [0m[94mRunning tests for Stage #11: jw4[0m
[33m[stage-11] [0m[94mCreated RDB file with 3 keys: ["banana" "apple" "blueberry"][0m
-[33m[stage-11] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2161578068 --dbfilename blueberry.rdb[0m
+[33m[stage-11] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2596974998 --dbfilename blueberry.rdb[0m
[33m[stage-11] [0m[94mclient: $ redis-cli KEYS *[0m
[33m[stage-11] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
-[33m[stage-11] [0m[36mclient: Received bytes: "*3\r\n$9\r\nblueberry\r\n$6\r\nbanana\r\n$5\r\napple\r\n"[0m
-[33m[stage-11] [0m[36mclient: Received RESP array: ["blueberry", "banana", "apple"][0m
-[33m[stage-11] [0m[92mReceived ["blueberry", "banana", "apple"][0m
+[33m[stage-11] [0m[36mclient: Received bytes: "*3\r\n$9\r\nblueberry\r\n$5\r\napple\r\n$6\r\nbanana\r\n"[0m
+[33m[stage-11] [0m[36mclient: Received RESP array: ["blueberry", "apple", "banana"][0m
+[33m[stage-11] [0m[92mReceived ["blueberry", "apple", "banana"][0m
[33m[stage-11] [0m[92mTest passed.[0m
[33m[stage-11] [0m[36mTerminating program[0m
[33m[stage-11] [0m[36mProgram terminated successfully[0m
[33m[stage-10] [0m[94mRunning tests for Stage #10: gc6[0m
[33m[stage-10] [0m[94mCreated RDB file with single key-value pair: grape="pineapple"[0m
-[33m[stage-10] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2004705524 --dbfilename orange.rdb[0m
+[33m[stage-10] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles383736839 --dbfilename orange.rdb[0m
[33m[stage-10] [0m[94mclient: $ redis-cli GET grape[0m
[33m[stage-10] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\ngrape\r\n"[0m
[33m[stage-10] [0m[36mclient: Received bytes: "$9\r\npineapple\r\n"[0m
@@ -79,7 +79,7 @@ Debug = true
[33m[stage-9] [0m[94mRunning tests for Stage #9: jz6[0m
[33m[stage-9] [0m[94mCreated RDB file with single key: "mango"[0m
-[33m[stage-9] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1043361946 --dbfilename pear.rdb[0m
+[33m[stage-9] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles142773913 --dbfilename pear.rdb[0m
[33m[stage-9] [0m[94mclient: $ redis-cli KEYS *[0m
[33m[stage-9] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
[33m[stage-9] [0m[36mclient: Received bytes: "*1\r\n$5\r\nmango\r\n"[0m
@@ -90,12 +90,12 @@ Debug = true
[33m[stage-9] [0m[36mProgram terminated successfully[0m
[33m[stage-8] [0m[94mRunning tests for Stage #8: zg5[0m
-[33m[stage-8] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1967874176 --dbfilename blueberry.rdb[0m
+[33m[stage-8] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1708726226 --dbfilename blueberry.rdb[0m
[33m[stage-8] [0m[94mclient: $ redis-cli CONFIG GET dir[0m
[33m[stage-8] [0m[36mclient: Sent bytes: "*3\r\n$6\r\nCONFIG\r\n$3\r\nGET\r\n$3\r\ndir\r\n"[0m
-[33m[stage-8] [0m[36mclient: Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1967874176\r\n"[0m
-[33m[stage-8] [0m[36mclient: Received RESP array: ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1967874176"][0m
-[33m[stage-8] [0m[92mReceived ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1967874176"][0m
+[33m[stage-8] [0m[36mclient: Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1708726226\r\n"[0m
+[33m[stage-8] [0m[36mclient: Received RESP array: ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1708726226"][0m
+[33m[stage-8] [0m[92mReceived ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1708726226"][0m
[33m[stage-8] [0m[92mTest passed.[0m
[33m[stage-8] [0m[36mTerminating program[0m
[33m[stage-8] [0m[36mProgram terminated successfully[0m
@@ -107,15 +107,15 @@ Debug = true
[33m[stage-7] [0m[36mReceived bytes: "+OK\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP simple string: "OK"[0m
[33m[stage-7] [0m[92mReceived "OK"[0m
-[33m[stage-7] [0m[92mReceived OK at 20:00:45.594[0m
-[33m[stage-7] [0m[94mFetching key "strawberry" at 20:00:45.594 (should not be expired)[0m
+[33m[stage-7] [0m[92mReceived OK at 13:28:51.062[0m
+[33m[stage-7] [0m[94mFetching key "strawberry" at 13:28:51.062 (should not be expired)[0m
[33m[stage-7] [0m[94m> GET strawberry[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$10\r\nstrawberry\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$4\r\npear\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP bulk string: "pear"[0m
[33m[stage-7] [0m[92mReceived "pear"[0m
[33m[stage-7] [0m[36mSleeping for 101ms[0m
-[33m[stage-7] [0m[94mFetching key "strawberry" at 20:00:45.697 (should be expired)[0m
+[33m[stage-7] [0m[94mFetching key "strawberry" at 13:28:51.166 (should be expired)[0m
[33m[stage-7] [0m[94m> GET strawberry[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$10\r\nstrawberry\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$-1\r\n"[0m
diff --git a/internal/test_helpers/fixtures/streams/pass b/internal/test_helpers/fixtures/streams/pass
index ae089d26..819ee990 100644
--- a/internal/test_helpers/fixtures/streams/pass
+++ b/internal/test_helpers/fixtures/streams/pass
@@ -215,7 +215,7 @@ Debug = true
[33m[stage-36] [0m[94mRunning tests for Stage #36: xu6[0m
[33m[stage-36] [0m[94m$ ./spawn_redis_server.sh[0m
[33m[stage-36] [0m[94m$ redis-cli xadd "mango" * foo bar[0m
-[33m[stage-36] [0m[94mReceived response: ""1718116262630-0""[0m
+[33m[stage-36] [0m[94mReceived response: ""1718351938723-0""[0m
[33m[stage-36] [0m[92mThe first part of the ID is a valid unix milliseconds timestamp[0m
[33m[stage-36] [0m[92mThe second part of the ID is a valid sequence number[0m
[33m[stage-36] [0m[92mTest passed.[0m
@@ -293,11 +293,11 @@ Debug = true
[33m[stage-31] [0m[92mReceived "OK"[0m
[33m[stage-31] [0m[94mreplica-1: > PSYNC ? -1[0m
[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-31] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0\r\n"[0m
-[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
-[33m[stage-31] [0m[92mReceived "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
[33m[stage-31] [0m[36mReading RDB file...[0m
-[33m[stage-31] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime§_hf\xfa\bused-mem\xc20\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(621d10f0c496c5a070d10141d7088a1cf31b9f78\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8e̟\xd8\xe3\x80Z\xa3"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2C\xf8kf\xfa\bused-mem\xc2P\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(8965bde70155f67b71a42d008e93f087ae062fcb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\u0378V\x1f\xdd\x15\\\xff"[0m
[33m[stage-31] [0m[92mReceived RDB file[0m
[33m[stage-31] [0m[36mCreating replica: 2[0m
[33m[stage-31] [0m[94mreplica-2: $ redis-cli PING[0m
@@ -317,11 +317,11 @@ Debug = true
[33m[stage-31] [0m[92mReceived "OK"[0m
[33m[stage-31] [0m[94mreplica-2: > PSYNC ? -1[0m
[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-31] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0\r\n"[0m
-[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
-[33m[stage-31] [0m[92mReceived "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
[33m[stage-31] [0m[36mReading RDB file...[0m
-[33m[stage-31] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime§_hf\xfa\bused-mem\xc2\xc0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(621d10f0c496c5a070d10141d7088a1cf31b9f78\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff'\xd9\b\xdf\x1b-\x94\x16"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2C\xf8kf\xfa\bused-mem\xc2\xe0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(8965bde70155f67b71a42d008e93f087ae062fcb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x86K\xf1O\xbbq(\xa6"[0m
[33m[stage-31] [0m[92mReceived RDB file[0m
[33m[stage-31] [0m[36mCreating replica: 3[0m
[33m[stage-31] [0m[94mreplica-3: $ redis-cli PING[0m
@@ -341,11 +341,11 @@ Debug = true
[33m[stage-31] [0m[92mReceived "OK"[0m
[33m[stage-31] [0m[94mreplica-3: > PSYNC ? -1[0m
[33m[stage-31] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-31] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0\r\n"[0m
-[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
-[33m[stage-31] [0m[92mReceived "FULLRESYNC 621d10f0c496c5a070d10141d7088a1cf31b9f78 0"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 8965bde70155f67b71a42d008e93f087ae062fcb 0"[0m
[33m[stage-31] [0m[36mReading RDB file...[0m
-[33m[stage-31] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime§_hf\xfa\bused-mem\xc2\xc0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(621d10f0c496c5a070d10141d7088a1cf31b9f78\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x1f\xfe\x90\x97\xf2\xe2\x038"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2C\xf8kf\xfa\bused-mem\xc2\xe0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(8965bde70155f67b71a42d008e93f087ae062fcb\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xbeli\aR\xbe\xbf\x88"[0m
[33m[stage-31] [0m[92mReceived RDB file[0m
[33m[stage-31] [0m[94mclient: $ redis-cli SET foo 123[0m
[33m[stage-31] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
@@ -438,7 +438,7 @@ Debug = true
[33m[stage-31] [0m[36mreplica-3: Not sending ACK to Master[0m
[33m[stage-31] [0m[36mclient: Received bytes: ":2\r\n"[0m
[33m[stage-31] [0m[36mclient: Received RESP integer: 2[0m
-[33m[stage-31] [0m[94mWAIT command returned after 2094 ms[0m
+[33m[stage-31] [0m[94mWAIT command returned after 2009 ms[0m
[33m[stage-31] [0m[92mTest passed.[0m
[33m[stage-31] [0m[36mTerminating program[0m
[33m[stage-31] [0m[36mProgram terminated successfully[0m
@@ -464,11 +464,11 @@ Debug = true
[33m[stage-30] [0m[92mReceived "OK"[0m
[33m[stage-30] [0m[94mreplica-1: > PSYNC ? -1[0m
[33m[stage-30] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-30] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0\r\n"[0m
-[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
-[33m[stage-30] [0m[92mReceived "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
[33m[stage-30] [0m[36mReading RDB file...[0m
-[33m[stage-30] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime©_hf\xfa\bused-mem\xc2\x10\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(21b4727bf25bc40a9c76ad49d09596b6b035452d\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa9\xdd\xca\xd5Dp\xec*"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2E\xf8kf\xfa\bused-mem\xc2\xf0\r\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6a4bad58bfdbc1ed46748a175209b2ec761524ed\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x19m^ \x0e\b-N"[0m
[33m[stage-30] [0m[92mReceived RDB file[0m
[33m[stage-30] [0m[36mCreating replica: 2[0m
[33m[stage-30] [0m[94mreplica-2: $ redis-cli PING[0m
@@ -488,11 +488,11 @@ Debug = true
[33m[stage-30] [0m[92mReceived "OK"[0m
[33m[stage-30] [0m[94mreplica-2: > PSYNC ? -1[0m
[33m[stage-30] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-30] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0\r\n"[0m
-[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
-[33m[stage-30] [0m[92mReceived "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
[33m[stage-30] [0m[36mReading RDB file...[0m
-[33m[stage-30] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime©_hf\xfa\bused-mem\u00a0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(21b4727bf25bc40a9c76ad49d09596b6b035452d\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xe2.m\x85\"\x14\x98s"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2E\xf8kf\xfa\bused-mem\u0080\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6a4bad58bfdbc1ed46748a175209b2ec761524ed\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff+\xc7%V_\xe3\x96s"[0m
[33m[stage-30] [0m[92mReceived RDB file[0m
[33m[stage-30] [0m[36mCreating replica: 3[0m
[33m[stage-30] [0m[94mreplica-3: $ redis-cli PING[0m
@@ -512,11 +512,11 @@ Debug = true
[33m[stage-30] [0m[92mReceived "OK"[0m
[33m[stage-30] [0m[94mreplica-3: > PSYNC ? -1[0m
[33m[stage-30] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-30] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0\r\n"[0m
-[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
-[33m[stage-30] [0m[92mReceived "FULLRESYNC 21b4727bf25bc40a9c76ad49d09596b6b035452d 0"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 6a4bad58bfdbc1ed46748a175209b2ec761524ed 0"[0m
[33m[stage-30] [0m[36mReading RDB file...[0m
-[33m[stage-30] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime©_hf\xfa\bused-mem\u00a0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(21b4727bf25bc40a9c76ad49d09596b6b035452d\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xda\t\xf5\xcd\xcb\xdb\x0f]"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2E\xf8kf\xfa\bused-mem\u0080@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(6a4bad58bfdbc1ed46748a175209b2ec761524ed\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x13\xe0\xbd\x1e\xb6,\x01]"[0m
[33m[stage-30] [0m[92mReceived RDB file[0m
[33m[stage-30] [0m[94mclient: $ redis-cli WAIT 3 500[0m
[33m[stage-30] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n"[0m
@@ -720,11 +720,11 @@ Debug = true
[33m[stage-25] [0m[92mReceived "OK"[0m
[33m[stage-25] [0m[94mreplica-1: > PSYNC ? -1[0m
[33m[stage-25] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-25] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0\r\n"[0m
-[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
-[33m[stage-25] [0m[92mReceived "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
[33m[stage-25] [0m[36mReading RDB file...[0m
-[33m[stage-25] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime¬_hf\xfa\bused-mem\xc2 S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(99c8652bed12063d6b0c3528c21ced60fe57d6c3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb8\xda\xe6\x91q\x8fk7"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2G\xf8kf\xfa\bused-mem\xc2\xc0S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(076f601d81e979b1530c70e56a413fe84ef9cc43\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffq\x14\xd3\xcco\xd7\x1d\x00"[0m
[33m[stage-25] [0m[92mReceived RDB file[0m
[33m[stage-25] [0m[36mCreating replica: 2[0m
[33m[stage-25] [0m[94mreplica-2: $ redis-cli PING[0m
@@ -744,11 +744,11 @@ Debug = true
[33m[stage-25] [0m[92mReceived "OK"[0m
[33m[stage-25] [0m[94mreplica-2: > PSYNC ? -1[0m
[33m[stage-25] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-25] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0\r\n"[0m
-[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
-[33m[stage-25] [0m[92mReceived "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
[33m[stage-25] [0m[36mReading RDB file...[0m
-[33m[stage-25] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime¬_hf\xfa\bused-mem\u0090:\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(99c8652bed12063d6b0c3528c21ced60fe57d6c3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\b\xaf\x18a`\x05\xdb\""[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2H\xf8kf\xfa\bused-mem\xc20;\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(076f601d81e979b1530c70e56a413fe84ef9cc43\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffقu\xa3\x1a\xdbgr"[0m
[33m[stage-25] [0m[92mReceived RDB file[0m
[33m[stage-25] [0m[36mCreating replica: 3[0m
[33m[stage-25] [0m[94mreplica-3: $ redis-cli PING[0m
@@ -768,11 +768,11 @@ Debug = true
[33m[stage-25] [0m[92mReceived "OK"[0m
[33m[stage-25] [0m[94mreplica-3: > PSYNC ? -1[0m
[33m[stage-25] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-25] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0\r\n"[0m
-[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
-[33m[stage-25] [0m[92mReceived "FULLRESYNC 99c8652bed12063d6b0c3528c21ced60fe57d6c3 0"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 076f601d81e979b1530c70e56a413fe84ef9cc43 0"[0m
[33m[stage-25] [0m[36mReading RDB file...[0m
-[33m[stage-25] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime¬_hf\xfa\bused-mem\u00a0I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(99c8652bed12063d6b0c3528c21ced60fe57d6c3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff-\xbdK\xa9\xc9i\x8cF"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2H\xf8kf\xfa\bused-mem\xc2@J\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(076f601d81e979b1530c70e56a413fe84ef9cc43\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x1f\xb9w\x0eg\xc1\xd3O"[0m
[33m[stage-25] [0m[92mReceived RDB file[0m
[33m[stage-25] [0m[94mclient: $ redis-cli SET foo 123[0m
[33m[stage-25] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
@@ -857,11 +857,11 @@ Debug = true
[33m[stage-24] [0m[92mReceived "OK"[0m
[33m[stage-24] [0m[94mreplica: > PSYNC ? -1[0m
[33m[stage-24] [0m[36mreplica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-24] [0m[36mreplica: Received bytes: "+FULLRESYNC 446bb4a75f064ae3e2b98b55674872078bf38b0a 0\r\n"[0m
-[33m[stage-24] [0m[36mreplica: Received RESP simple string: "FULLRESYNC 446bb4a75f064ae3e2b98b55674872078bf38b0a 0"[0m
-[33m[stage-24] [0m[92mReceived "FULLRESYNC 446bb4a75f064ae3e2b98b55674872078bf38b0a 0"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "+FULLRESYNC 341d75e90ca30f190449cdbe9a77e95ac3baf3cc 0\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP simple string: "FULLRESYNC 341d75e90ca30f190449cdbe9a77e95ac3baf3cc 0"[0m
+[33m[stage-24] [0m[92mReceived "FULLRESYNC 341d75e90ca30f190449cdbe9a77e95ac3baf3cc 0"[0m
[33m[stage-24] [0m[36mReading RDB file...[0m
-[33m[stage-24] [0m[36mreplica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime¬_hf\xfa\bused-mem\xc2`S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(446bb4a75f064ae3e2b98b55674872078bf38b0a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xfffc\xa3\x87[[&\x85"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2H\xf8kf\xfa\bused-mem\xc2`S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(341d75e90ca30f190449cdbe9a77e95ac3baf3cc\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x15)Jxƅg$"[0m
[33m[stage-24] [0m[92mReceived RDB file[0m
[33m[stage-24] [0m[94mclient: $ redis-cli SET foo 123[0m
[33m[stage-24] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
@@ -916,11 +916,11 @@ Debug = true
[33m[stage-23] [0m[92mReceived "OK"[0m
[33m[stage-23] [0m[94mclient: > PSYNC ? -1[0m
[33m[stage-23] [0m[36mclient: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-23] [0m[36mclient: Received bytes: "+FULLRESYNC 528286689160f7bee2c769ca06019c0f899abb1d 0\r\n"[0m
-[33m[stage-23] [0m[36mclient: Received RESP simple string: "FULLRESYNC 528286689160f7bee2c769ca06019c0f899abb1d 0"[0m
-[33m[stage-23] [0m[92mReceived "FULLRESYNC 528286689160f7bee2c769ca06019c0f899abb1d 0"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "+FULLRESYNC bec7657fc36ac8fb2f6aeaa2ede91eea6a245b86 0\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received RESP simple string: "FULLRESYNC bec7657fc36ac8fb2f6aeaa2ede91eea6a245b86 0"[0m
+[33m[stage-23] [0m[92mReceived "FULLRESYNC bec7657fc36ac8fb2f6aeaa2ede91eea6a245b86 0"[0m
[33m[stage-23] [0m[36mReading RDB file...[0m
-[33m[stage-23] [0m[36mclient: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime¬_hf\xfa\bused-mem°\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(528286689160f7bee2c769ca06019c0f899abb1d\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8e\xd5\\\xc9\xfbS\xde\x1b"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2H\xf8kf\xfa\bused-mem\xc2\xd0\r\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bec7657fc36ac8fb2f6aeaa2ede91eea6a245b86\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x9a\x88\xa4\xf4èL^"[0m
[33m[stage-23] [0m[92mReceived RDB file[0m
[33m[stage-23] [0m[92mTest passed.[0m
[33m[stage-23] [0m[36mTerminating program[0m
@@ -945,9 +945,9 @@ Debug = true
[33m[stage-22] [0m[92mReceived "OK"[0m
[33m[stage-22] [0m[94mclient: > PSYNC ? -1[0m
[33m[stage-22] [0m[36mclient: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
-[33m[stage-22] [0m[36mclient: Received bytes: "+FULLRESYNC e3b1141657b2cc2ffa6f38dbee4e118e8479f1f4 0\r\n"[0m
-[33m[stage-22] [0m[36mclient: Received RESP simple string: "FULLRESYNC e3b1141657b2cc2ffa6f38dbee4e118e8479f1f4 0"[0m
-[33m[stage-22] [0m[92mReceived "FULLRESYNC e3b1141657b2cc2ffa6f38dbee4e118e8479f1f4 0"[0m
+[33m[stage-22] [0m[36mclient: Received bytes: "+FULLRESYNC 7a8142c02c705f559b35195392a38e09b9d7ccd9 0\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received RESP simple string: "FULLRESYNC 7a8142c02c705f559b35195392a38e09b9d7ccd9 0"[0m
+[33m[stage-22] [0m[92mReceived "FULLRESYNC 7a8142c02c705f559b35195392a38e09b9d7ccd9 0"[0m
[33m[stage-22] [0m[92mTest passed.[0m
[33m[stage-22] [0m[36mTerminating program[0m
[33m[stage-22] [0m[36mProgram terminated successfully[0m
@@ -1046,9 +1046,9 @@ Debug = true
[33m[stage-17] [0m[94m$ ./spawn_redis_server.sh[0m
[33m[stage-17] [0m[94mclient: $ redis-cli INFO replication[0m
[33m[stage-17] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n"[0m
-[33m[stage-17] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:987bbfeeca4616af6d1291243f53e1a837a757d4\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"[0m
-[33m[stage-17] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:987bbfeeca4616af6d1291243f53e1a837a757d4\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"[0m
-[33m[stage-17] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:987bbfeeca4616af6d1291243f53e1a837a757d4\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"[0m
+[33m[stage-17] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:440193ba3ac20e968150152fb60781eb3631e128\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"[0m
+[33m[stage-17] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:440193ba3ac20e968150152fb60781eb3631e128\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"[0m
+[33m[stage-17] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:440193ba3ac20e968150152fb60781eb3631e128\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"[0m
[33m[stage-17] [0m[92mFound master_replid:xxx in response.[0m
[33m[stage-17] [0m[92mFound master_reploffset:0 in response.[0m
[33m[stage-17] [0m[92mTest passed.[0m
@@ -1089,9 +1089,9 @@ Debug = true
[33m[stage-15] [0m[94m$ ./spawn_redis_server.sh[0m
[33m[stage-15] [0m[94mclient: $ redis-cli INFO replication[0m
[33m[stage-15] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n"[0m
-[33m[stage-15] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:898d6da3a136f5920e5ce78a71478a7b795ab380\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"[0m
-[33m[stage-15] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:898d6da3a136f5920e5ce78a71478a7b795ab380\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"[0m
-[33m[stage-15] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:898d6da3a136f5920e5ce78a71478a7b795ab380\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"[0m
+[33m[stage-15] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:54df69f029f58da533312ef20853623a74aa0919\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"[0m
+[33m[stage-15] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:54df69f029f58da533312ef20853623a74aa0919\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"[0m
+[33m[stage-15] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:54df69f029f58da533312ef20853623a74aa0919\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"[0m
[33m[stage-15] [0m[92mFound role:master in response.[0m
[33m[stage-15] [0m[92mTest passed.[0m
[33m[stage-15] [0m[36mTerminating program[0m
@@ -1106,7 +1106,7 @@ Debug = true
[33m[stage-14] [0m[36mProgram terminated successfully[0m
[33m[stage-13] [0m[94mRunning tests for Stage #13: sm4[0m
-[33m[stage-13] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1104761699 --dbfilename banana.rdb[0m
+[33m[stage-13] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3464846617 --dbfilename banana.rdb[0m
[33m[stage-13] [0m[94mclient: $ redis-cli GET blueberry[0m
[33m[stage-13] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\nblueberry\r\n"[0m
[33m[stage-13] [0m[36mclient: Received bytes: "$4\r\npear\r\n"[0m
@@ -1133,7 +1133,7 @@ Debug = true
[33m[stage-12] [0m[94mRunning tests for Stage #12: dq3[0m
[33m[stage-12] [0m[94mCreated RDB file with key-value pairs: "pineapple"="pear", "raspberry"="strawberry", "pear"="pineapple"[0m
-[33m[stage-12] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1757425797 --dbfilename strawberry.rdb[0m
+[33m[stage-12] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1186933777 --dbfilename strawberry.rdb[0m
[33m[stage-12] [0m[94mclient: $ redis-cli GET pineapple[0m
[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\npineapple\r\n"[0m
[33m[stage-12] [0m[36mclient: Received bytes: "$4\r\npear\r\n"[0m
@@ -1155,19 +1155,19 @@ Debug = true
[33m[stage-11] [0m[94mRunning tests for Stage #11: jw4[0m
[33m[stage-11] [0m[94mCreated RDB file with 4 keys: ["mango" "pineapple" "blueberry" "apple"][0m
-[33m[stage-11] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2865505801 --dbfilename strawberry.rdb[0m
+[33m[stage-11] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1436298453 --dbfilename strawberry.rdb[0m
[33m[stage-11] [0m[94mclient: $ redis-cli KEYS *[0m
[33m[stage-11] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
-[33m[stage-11] [0m[36mclient: Received bytes: "*4\r\n$5\r\napple\r\n$9\r\npineapple\r\n$5\r\nmango\r\n$9\r\nblueberry\r\n"[0m
-[33m[stage-11] [0m[36mclient: Received RESP array: ["apple", "pineapple", "mango", "blueberry"][0m
-[33m[stage-11] [0m[92mReceived ["apple", "pineapple", "mango", "blueberry"][0m
+[33m[stage-11] [0m[36mclient: Received bytes: "*4\r\n$5\r\napple\r\n$9\r\nblueberry\r\n$9\r\npineapple\r\n$5\r\nmango\r\n"[0m
+[33m[stage-11] [0m[36mclient: Received RESP array: ["apple", "blueberry", "pineapple", "mango"][0m
+[33m[stage-11] [0m[92mReceived ["apple", "blueberry", "pineapple", "mango"][0m
[33m[stage-11] [0m[92mTest passed.[0m
[33m[stage-11] [0m[36mTerminating program[0m
[33m[stage-11] [0m[36mProgram terminated successfully[0m
[33m[stage-10] [0m[94mRunning tests for Stage #10: gc6[0m
[33m[stage-10] [0m[94mCreated RDB file with single key-value pair: grape="raspberry"[0m
-[33m[stage-10] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3625740230 --dbfilename blueberry.rdb[0m
+[33m[stage-10] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3560698957 --dbfilename blueberry.rdb[0m
[33m[stage-10] [0m[94mclient: $ redis-cli GET grape[0m
[33m[stage-10] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\ngrape\r\n"[0m
[33m[stage-10] [0m[36mclient: Received bytes: "$9\r\nraspberry\r\n"[0m
@@ -1179,7 +1179,7 @@ Debug = true
[33m[stage-9] [0m[94mRunning tests for Stage #9: jz6[0m
[33m[stage-9] [0m[94mCreated RDB file with single key: "orange"[0m
-[33m[stage-9] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles269673552 --dbfilename mango.rdb[0m
+[33m[stage-9] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3889048063 --dbfilename mango.rdb[0m
[33m[stage-9] [0m[94mclient: $ redis-cli KEYS *[0m
[33m[stage-9] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
[33m[stage-9] [0m[36mclient: Received bytes: "*1\r\n$6\r\norange\r\n"[0m
@@ -1190,12 +1190,12 @@ Debug = true
[33m[stage-9] [0m[36mProgram terminated successfully[0m
[33m[stage-8] [0m[94mRunning tests for Stage #8: zg5[0m
-[33m[stage-8] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3106879690 --dbfilename raspberry.rdb[0m
+[33m[stage-8] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2176374416 --dbfilename raspberry.rdb[0m
[33m[stage-8] [0m[94mclient: $ redis-cli CONFIG GET dir[0m
[33m[stage-8] [0m[36mclient: Sent bytes: "*3\r\n$6\r\nCONFIG\r\n$3\r\nGET\r\n$3\r\ndir\r\n"[0m
-[33m[stage-8] [0m[36mclient: Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3106879690\r\n"[0m
-[33m[stage-8] [0m[36mclient: Received RESP array: ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3106879690"][0m
-[33m[stage-8] [0m[92mReceived ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3106879690"][0m
+[33m[stage-8] [0m[36mclient: Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2176374416\r\n"[0m
+[33m[stage-8] [0m[36mclient: Received RESP array: ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2176374416"][0m
+[33m[stage-8] [0m[92mReceived ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2176374416"][0m
[33m[stage-8] [0m[92mTest passed.[0m
[33m[stage-8] [0m[36mTerminating program[0m
[33m[stage-8] [0m[36mProgram terminated successfully[0m
@@ -1207,15 +1207,15 @@ Debug = true
[33m[stage-7] [0m[36mReceived bytes: "+OK\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP simple string: "OK"[0m
[33m[stage-7] [0m[92mReceived "OK"[0m
-[33m[stage-7] [0m[92mReceived OK at 20:01:11.910[0m
-[33m[stage-7] [0m[94mFetching key "banana" at 20:01:11.910 (should not be expired)[0m
+[33m[stage-7] [0m[92mReceived OK at 13:29:07.724[0m
+[33m[stage-7] [0m[94mFetching key "banana" at 13:29:07.724 (should not be expired)[0m
[33m[stage-7] [0m[94m> GET banana[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$6\r\nbanana\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$6\r\norange\r\n"[0m
[33m[stage-7] [0m[36mReceived RESP bulk string: "orange"[0m
[33m[stage-7] [0m[92mReceived "orange"[0m
[33m[stage-7] [0m[36mSleeping for 101ms[0m
-[33m[stage-7] [0m[94mFetching key "banana" at 20:01:12.014 (should be expired)[0m
+[33m[stage-7] [0m[94mFetching key "banana" at 13:29:07.827 (should be expired)[0m
[33m[stage-7] [0m[94m> GET banana[0m
[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$6\r\nbanana\r\n"[0m
[33m[stage-7] [0m[36mReceived bytes: "$-1\r\n"[0m
diff --git a/internal/test_helpers/fixtures/transactions/pass b/internal/test_helpers/fixtures/transactions/pass
new file mode 100644
index 00000000..aadea53a
--- /dev/null
+++ b/internal/test_helpers/fixtures/transactions/pass
@@ -0,0 +1,1845 @@
+Debug = true
+
+[33m[stage-55] [0m[94mRunning tests for Stage #55: jf8[0m
+[33m[stage-55] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-55] [0m[94mclient-1: $ redis-cli SET blueberry 80[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$2\r\n80\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[94mclient-1: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: ":1\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP integer: 1[0m
+[33m[stage-55] [0m[92mReceived 1[0m
+[33m[stage-55] [0m[94mclient-2: $ redis-cli SET blueberry 80[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$2\r\n80\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[94mclient-2: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: ":2\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP integer: 2[0m
+[33m[stage-55] [0m[92mReceived 2[0m
+[33m[stage-55] [0m[94mclient-3: $ redis-cli SET blueberry 80[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$2\r\n80\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[94mclient-3: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: ":3\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP integer: 3[0m
+[33m[stage-55] [0m[92mReceived 3[0m
+[33m[stage-55] [0m[94mclient-1: > MULTI[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[36mSending command: #1/#2[0m
+[33m[stage-55] [0m[94mclient-1: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[36mSending command: #2/#2[0m
+[33m[stage-55] [0m[94mclient-1: > INCR blueberry[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[94mclient-2: > MULTI[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[36mSending command: #1/#2[0m
+[33m[stage-55] [0m[94mclient-2: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[36mSending command: #2/#2[0m
+[33m[stage-55] [0m[94mclient-2: > INCR blueberry[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[94mclient-3: > MULTI[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP simple string: "OK"[0m
+[33m[stage-55] [0m[92mReceived "OK"[0m
+[33m[stage-55] [0m[36mSending command: #1/#2[0m
+[33m[stage-55] [0m[94mclient-3: > INCR apple[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[36mSending command: #2/#2[0m
+[33m[stage-55] [0m[94mclient-3: > INCR blueberry[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP simple string: "QUEUED"[0m
+[33m[stage-55] [0m[92mReceived "QUEUED"[0m
+[33m[stage-55] [0m[94mclient-1: > EXEC[0m
+[33m[stage-55] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received bytes: "*2\r\n:4\r\n:81\r\n"[0m
+[33m[stage-55] [0m[36mclient-1: Received RESP array: [4, 81][0m
+[33m[stage-55] [0m[92mReceived [4, 81][0m
+[33m[stage-55] [0m[94mclient-2: > EXEC[0m
+[33m[stage-55] [0m[36mclient-2: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received bytes: "*2\r\n:5\r\n:82\r\n"[0m
+[33m[stage-55] [0m[36mclient-2: Received RESP array: [5, 82][0m
+[33m[stage-55] [0m[92mReceived [5, 82][0m
+[33m[stage-55] [0m[94mclient-3: > EXEC[0m
+[33m[stage-55] [0m[36mclient-3: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received bytes: "*2\r\n:6\r\n:83\r\n"[0m
+[33m[stage-55] [0m[36mclient-3: Received RESP array: [6, 83][0m
+[33m[stage-55] [0m[92mReceived [6, 83][0m
+[33m[stage-55] [0m[92mTest passed.[0m
+[33m[stage-55] [0m[36mTerminating program[0m
+[33m[stage-55] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-54] [0m[94mRunning tests for Stage #54: sg9[0m
+[33m[stage-54] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-54] [0m[94mclient-1: $ redis-cli SET pineapple pear[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\npineapple\r\n$4\r\npear\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-54] [0m[92mReceived "OK"[0m
+[33m[stage-54] [0m[94mclient-1: > SET grape 92[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*3\r\n$3\r\nSET\r\n$5\r\ngrape\r\n$2\r\n92\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-54] [0m[92mReceived "OK"[0m
+[33m[stage-54] [0m[94mclient-1: > MULTI[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-54] [0m[92mReceived "OK"[0m
+[33m[stage-54] [0m[36mSending command: #1/#2[0m
+[33m[stage-54] [0m[94mclient-1: > INCR pineapple[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\npineapple\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-54] [0m[92mReceived "QUEUED"[0m
+[33m[stage-54] [0m[36mSending command: #2/#2[0m
+[33m[stage-54] [0m[94mclient-1: > INCR grape[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\ngrape\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-54] [0m[92mReceived "QUEUED"[0m
+[33m[stage-54] [0m[94mclient-1: > EXEC[0m
+[33m[stage-54] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received bytes: "*2\r\n-ERR value is not an integer or out of range\r\n:93\r\n"[0m
+[33m[stage-54] [0m[36mclient-1: Received RESP array: ["ERR: ERR value is not an integer or out of range", 93][0m
+[33m[stage-54] [0m[92mReceived ["ERR: ERR value is not an integer or out of range", 93][0m
+[33m[stage-54] [0m[94mclient-2: $ redis-cli GET grape[0m
+[33m[stage-54] [0m[36mclient-2: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\ngrape\r\n"[0m
+[33m[stage-54] [0m[36mclient-2: Received bytes: "$2\r\n93\r\n"[0m
+[33m[stage-54] [0m[36mclient-2: Received RESP bulk string: "93"[0m
+[33m[stage-54] [0m[92mReceived "93"[0m
+[33m[stage-54] [0m[94mclient-2: > GET pineapple[0m
+[33m[stage-54] [0m[36mclient-2: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\npineapple\r\n"[0m
+[33m[stage-54] [0m[36mclient-2: Received bytes: "$4\r\npear\r\n"[0m
+[33m[stage-54] [0m[36mclient-2: Received RESP bulk string: "pear"[0m
+[33m[stage-54] [0m[92mReceived "pear"[0m
+[33m[stage-54] [0m[92mTest passed.[0m
+[33m[stage-54] [0m[36mTerminating program[0m
+[33m[stage-54] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-53] [0m[94mRunning tests for Stage #53: rl9[0m
+[33m[stage-53] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-53] [0m[94mclient: $ redis-cli SET grape 35[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$5\r\ngrape\r\n$2\r\n35\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-53] [0m[92mReceived "OK"[0m
+[33m[stage-53] [0m[94mclient: > MULTI[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-53] [0m[92mReceived "OK"[0m
+[33m[stage-53] [0m[36mSending command: #1/#2[0m
+[33m[stage-53] [0m[94mclient: > SET raspberry 96[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nraspberry\r\n$2\r\n96\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP simple string: "QUEUED"[0m
+[33m[stage-53] [0m[92mReceived "QUEUED"[0m
+[33m[stage-53] [0m[36mSending command: #2/#2[0m
+[33m[stage-53] [0m[94mclient: > INCR raspberry[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nraspberry\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP simple string: "QUEUED"[0m
+[33m[stage-53] [0m[92mReceived "QUEUED"[0m
+[33m[stage-53] [0m[94mclient: > DISCARD[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*1\r\n$7\r\nDISCARD\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-53] [0m[92mReceived "OK"[0m
+[33m[stage-53] [0m[94mclient: > GET raspberry[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\nraspberry\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "$-1\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP null bulk string: "$-1\r\n"[0m
+[33m[stage-53] [0m[92mReceived "$-1\r\n"[0m
+[33m[stage-53] [0m[94mclient: > GET grape[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\ngrape\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "$2\r\n35\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP bulk string: "35"[0m
+[33m[stage-53] [0m[92mReceived "35"[0m
+[33m[stage-53] [0m[94mclient: > DISCARD[0m
+[33m[stage-53] [0m[36mclient: Sent bytes: "*1\r\n$7\r\nDISCARD\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received bytes: "-ERR DISCARD without MULTI\r\n"[0m
+[33m[stage-53] [0m[36mclient: Received RESP error: "ERR: ERR DISCARD without MULTI"[0m
+[33m[stage-53] [0m[92mReceived "ERR: ERR DISCARD without MULTI"[0m
+[33m[stage-53] [0m[92mTest passed.[0m
+[33m[stage-53] [0m[36mTerminating program[0m
+[33m[stage-53] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-52] [0m[94mRunning tests for Stage #52: fy6[0m
+[33m[stage-52] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-52] [0m[94mclient-1: $ redis-cli MULTI[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-52] [0m[92mReceived "OK"[0m
+[33m[stage-52] [0m[36mSending command: #1/#4[0m
+[33m[stage-52] [0m[94mclient-1: > SET blueberry 50[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$2\r\n50\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-52] [0m[92mReceived "QUEUED"[0m
+[33m[stage-52] [0m[36mSending command: #2/#4[0m
+[33m[stage-52] [0m[94mclient-1: > INCR blueberry[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-52] [0m[92mReceived "QUEUED"[0m
+[33m[stage-52] [0m[36mSending command: #3/#4[0m
+[33m[stage-52] [0m[94mclient-1: > INCR orange[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$6\r\norange\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-52] [0m[92mReceived "QUEUED"[0m
+[33m[stage-52] [0m[36mSending command: #4/#4[0m
+[33m[stage-52] [0m[94mclient-1: > GET orange[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*2\r\n$3\r\nGET\r\n$6\r\norange\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-52] [0m[92mReceived "QUEUED"[0m
+[33m[stage-52] [0m[94mclient-1: > EXEC[0m
+[33m[stage-52] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received bytes: "*4\r\n+OK\r\n:51\r\n:1\r\n$1\r\n1\r\n"[0m
+[33m[stage-52] [0m[36mclient-1: Received RESP array: ["OK", 51, 1, "1"][0m
+[33m[stage-52] [0m[92mReceived ["OK", 51, 1, "1"][0m
+[33m[stage-52] [0m[94mclient-2: $ redis-cli GET blueberry[0m
+[33m[stage-52] [0m[36mclient-2: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-52] [0m[36mclient-2: Received bytes: "$2\r\n51\r\n"[0m
+[33m[stage-52] [0m[36mclient-2: Received RESP bulk string: "51"[0m
+[33m[stage-52] [0m[92mReceived "51"[0m
+[33m[stage-52] [0m[92mTest passed.[0m
+[33m[stage-52] [0m[36mTerminating program[0m
+[33m[stage-52] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-51] [0m[94mRunning tests for Stage #51: rs9[0m
+[33m[stage-51] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-51] [0m[94mclient-1: $ redis-cli MULTI[0m
+[33m[stage-51] [0m[36mclient-1: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received RESP simple string: "OK"[0m
+[33m[stage-51] [0m[92mReceived "OK"[0m
+[33m[stage-51] [0m[36mSending command: #1/#2[0m
+[33m[stage-51] [0m[94mclient-1: > SET blueberry 73[0m
+[33m[stage-51] [0m[36mclient-1: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$2\r\n73\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-51] [0m[92mReceived "QUEUED"[0m
+[33m[stage-51] [0m[36mSending command: #2/#2[0m
+[33m[stage-51] [0m[94mclient-1: > INCR blueberry[0m
+[33m[stage-51] [0m[36mclient-1: Sent bytes: "*2\r\n$4\r\nINCR\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received bytes: "+QUEUED\r\n"[0m
+[33m[stage-51] [0m[36mclient-1: Received RESP simple string: "QUEUED"[0m
+[33m[stage-51] [0m[92mReceived "QUEUED"[0m
+[33m[stage-51] [0m[94mclient-2: $ redis-cli GET blueberry[0m
+[33m[stage-51] [0m[36mclient-2: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\nblueberry\r\n"[0m
+[33m[stage-51] [0m[36mclient-2: Received bytes: "$-1\r\n"[0m
+[33m[stage-51] [0m[36mclient-2: Received RESP null bulk string: "$-1\r\n"[0m
+[33m[stage-51] [0m[92mReceived "$-1\r\n"[0m
+[33m[stage-51] [0m[92mTest passed.[0m
+[33m[stage-51] [0m[36mTerminating program[0m
+[33m[stage-51] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-50] [0m[94mRunning tests for Stage #50: we1[0m
+[33m[stage-50] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-50] [0m[94mclient: $ redis-cli MULTI[0m
+[33m[stage-50] [0m[36mclient: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-50] [0m[92mReceived "OK"[0m
+[33m[stage-50] [0m[94mclient: > EXEC[0m
+[33m[stage-50] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received bytes: "*0\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received RESP array: [][0m
+[33m[stage-50] [0m[92mReceived [][0m
+[33m[stage-50] [0m[94mclient: > EXEC[0m
+[33m[stage-50] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received bytes: "-ERR EXEC without MULTI\r\n"[0m
+[33m[stage-50] [0m[36mclient: Received RESP error: "ERR: ERR EXEC without MULTI"[0m
+[33m[stage-50] [0m[92mReceived "ERR: ERR EXEC without MULTI"[0m
+[33m[stage-50] [0m[92mTest passed.[0m
+[33m[stage-50] [0m[36mTerminating program[0m
+[33m[stage-50] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-49] [0m[94mRunning tests for Stage #49: lo4[0m
+[33m[stage-49] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-49] [0m[94mclient: $ redis-cli EXEC[0m
+[33m[stage-49] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nEXEC\r\n"[0m
+[33m[stage-49] [0m[36mclient: Received bytes: "-ERR EXEC without MULTI\r\n"[0m
+[33m[stage-49] [0m[36mclient: Received RESP error: "ERR: ERR EXEC without MULTI"[0m
+[33m[stage-49] [0m[92mReceived "ERR: ERR EXEC without MULTI"[0m
+[33m[stage-49] [0m[92mTest passed.[0m
+[33m[stage-49] [0m[36mTerminating program[0m
+[33m[stage-49] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-48] [0m[94mRunning tests for Stage #48: pn0[0m
+[33m[stage-48] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-48] [0m[94mclient: $ redis-cli MULTI[0m
+[33m[stage-48] [0m[36mclient: Sent bytes: "*1\r\n$5\r\nMULTI\r\n"[0m
+[33m[stage-48] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-48] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-48] [0m[92mReceived "OK"[0m
+[33m[stage-48] [0m[92mTest passed.[0m
+[33m[stage-48] [0m[36mTerminating program[0m
+[33m[stage-48] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-47] [0m[94mRunning tests for Stage #47: mk1[0m
+[33m[stage-47] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-47] [0m[94mclient: $ redis-cli SET banana apple[0m
+[33m[stage-47] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$6\r\nbanana\r\n$5\r\napple\r\n"[0m
+[33m[stage-47] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-47] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-47] [0m[92mReceived "OK"[0m
+[33m[stage-47] [0m[94mclient: > INCR banana[0m
+[33m[stage-47] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINCR\r\n$6\r\nbanana\r\n"[0m
+[33m[stage-47] [0m[36mclient: Received bytes: "-ERR value is not an integer or out of range\r\n"[0m
+[33m[stage-47] [0m[36mclient: Received RESP error: "ERR: ERR value is not an integer or out of range"[0m
+[33m[stage-47] [0m[92mReceived "ERR: ERR value is not an integer or out of range"[0m
+[33m[stage-47] [0m[92mTest passed.[0m
+[33m[stage-47] [0m[36mTerminating program[0m
+[33m[stage-47] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-46] [0m[94mRunning tests for Stage #46: lz8[0m
+[33m[stage-46] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-46] [0m[94mclient: $ redis-cli INCR pear[0m
+[33m[stage-46] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINCR\r\n$4\r\npear\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received bytes: ":1\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received RESP integer: 1[0m
+[33m[stage-46] [0m[92mReceived 1[0m
+[33m[stage-46] [0m[94mclient: > INCR pear[0m
+[33m[stage-46] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINCR\r\n$4\r\npear\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received bytes: ":2\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received RESP integer: 2[0m
+[33m[stage-46] [0m[92mReceived 2[0m
+[33m[stage-46] [0m[94mclient: > GET pear[0m
+[33m[stage-46] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$4\r\npear\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received bytes: "$1\r\n2\r\n"[0m
+[33m[stage-46] [0m[36mclient: Received RESP bulk string: "2"[0m
+[33m[stage-46] [0m[92mReceived "2"[0m
+[33m[stage-46] [0m[92mTest passed.[0m
+[33m[stage-46] [0m[36mTerminating program[0m
+[33m[stage-46] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-45] [0m[94mRunning tests for Stage #45: si4[0m
+[33m[stage-45] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-45] [0m[94mclient: $ redis-cli SET apple 35[0m
+[33m[stage-45] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$5\r\napple\r\n$2\r\n35\r\n"[0m
+[33m[stage-45] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-45] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-45] [0m[92mReceived "OK"[0m
+[33m[stage-45] [0m[94mclient: > INCR apple[0m
+[33m[stage-45] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINCR\r\n$5\r\napple\r\n"[0m
+[33m[stage-45] [0m[36mclient: Received bytes: ":36\r\n"[0m
+[33m[stage-45] [0m[36mclient: Received RESP integer: 36[0m
+[33m[stage-45] [0m[92mReceived 36[0m
+[33m[stage-45] [0m[92mTest passed.[0m
+[33m[stage-45] [0m[36mTerminating program[0m
+[33m[stage-45] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-44] [0m[94mRunning tests for Stage #44: xu1[0m
+[33m[stage-44] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-44] [0m[94m$ redis-cli xadd "apple" "0-1" "temperature 10"[0m
+[33m[stage-44] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-44] [0m[94m$ redis-cli xread block '\x00' streams "apple 0-1"[0m
+[33m[stage-44] [0m[94m$ redis-cli xadd "apple" "0-2" "temperature 10"[0m
+[33m[stage-44] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-44] [0m[92mReceived response: "[[0m
+[33m[stage-44] [0m[92m {[0m
+[33m[stage-44] [0m[92m "Stream": "apple",[0m
+[33m[stage-44] [0m[92m "Messages": [[0m
+[33m[stage-44] [0m[92m {[0m
+[33m[stage-44] [0m[92m "ID": "0-2",[0m
+[33m[stage-44] [0m[92m "Values": {[0m
+[33m[stage-44] [0m[92m "temperature": "10"[0m
+[33m[stage-44] [0m[92m }[0m
+[33m[stage-44] [0m[92m }[0m
+[33m[stage-44] [0m[92m ][0m
+[33m[stage-44] [0m[92m }[0m
+[33m[stage-44] [0m[92m]"[0m
+[33m[stage-44] [0m[92mTest passed.[0m
+[33m[stage-44] [0m[36mTerminating program[0m
+[33m[stage-44] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-43] [0m[94mRunning tests for Stage #43: hw1[0m
+[33m[stage-43] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-43] [0m[94m$ redis-cli xadd "banana" "0-1" "temperature 91"[0m
+[33m[stage-43] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-43] [0m[94m$ redis-cli xread block '\x00' streams "banana 0-1"[0m
+[33m[stage-43] [0m[94m$ redis-cli xadd "banana" "0-2" "temperature 91"[0m
+[33m[stage-43] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-43] [0m[92mReceived response: "[[0m
+[33m[stage-43] [0m[92m {[0m
+[33m[stage-43] [0m[92m "Stream": "banana",[0m
+[33m[stage-43] [0m[92m "Messages": [[0m
+[33m[stage-43] [0m[92m {[0m
+[33m[stage-43] [0m[92m "ID": "0-2",[0m
+[33m[stage-43] [0m[92m "Values": {[0m
+[33m[stage-43] [0m[92m "temperature": "91"[0m
+[33m[stage-43] [0m[92m }[0m
+[33m[stage-43] [0m[92m }[0m
+[33m[stage-43] [0m[92m ][0m
+[33m[stage-43] [0m[92m }[0m
+[33m[stage-43] [0m[92m]"[0m
+[33m[stage-43] [0m[92mTest passed.[0m
+[33m[stage-43] [0m[36mTerminating program[0m
+[33m[stage-43] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-42] [0m[94mRunning tests for Stage #42: bs1[0m
+[33m[stage-42] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-42] [0m[94m$ redis-cli xadd "orange" "0-1" "temperature 2"[0m
+[33m[stage-42] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-42] [0m[94m$ redis-cli xread block 'Ϩ' streams "orange 0-1"[0m
+[33m[stage-42] [0m[94m$ redis-cli xadd "orange" "0-2" "temperature 2"[0m
+[33m[stage-42] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-42] [0m[92mReceived response: "[[0m
+[33m[stage-42] [0m[92m {[0m
+[33m[stage-42] [0m[92m "Stream": "orange",[0m
+[33m[stage-42] [0m[92m "Messages": [[0m
+[33m[stage-42] [0m[92m {[0m
+[33m[stage-42] [0m[92m "ID": "0-2",[0m
+[33m[stage-42] [0m[92m "Values": {[0m
+[33m[stage-42] [0m[92m "temperature": "2"[0m
+[33m[stage-42] [0m[92m }[0m
+[33m[stage-42] [0m[92m }[0m
+[33m[stage-42] [0m[92m ][0m
+[33m[stage-42] [0m[92m }[0m
+[33m[stage-42] [0m[92m]"[0m
+[33m[stage-42] [0m[94m$ redis-cli xread block 'Ϩ' streams "orange 0-2"[0m
+[33m[stage-42] [0m[92mReceived nil response[0m
+[33m[stage-42] [0m[92mTest passed.[0m
+[33m[stage-42] [0m[36mTerminating program[0m
+[33m[stage-42] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-41] [0m[94mRunning tests for Stage #41: ru9[0m
+[33m[stage-41] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-41] [0m[94m$ redis-cli xadd "pineapple" "0-1" "temperature 99"[0m
+[33m[stage-41] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-41] [0m[94m$ redis-cli xadd "orange" "0-2" "humidity 37"[0m
+[33m[stage-41] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-41] [0m[94m$ redis-cli xread streams "pineapple orange 0-0 0-1"[0m
+[33m[stage-41] [0m[92mReceived response: "[[0m
+[33m[stage-41] [0m[92m {[0m
+[33m[stage-41] [0m[92m "Stream": "pineapple",[0m
+[33m[stage-41] [0m[92m "Messages": [[0m
+[33m[stage-41] [0m[92m {[0m
+[33m[stage-41] [0m[92m "ID": "0-1",[0m
+[33m[stage-41] [0m[92m "Values": {[0m
+[33m[stage-41] [0m[92m "temperature": "99"[0m
+[33m[stage-41] [0m[92m }[0m
+[33m[stage-41] [0m[92m }[0m
+[33m[stage-41] [0m[92m ][0m
+[33m[stage-41] [0m[92m },[0m
+[33m[stage-41] [0m[92m {[0m
+[33m[stage-41] [0m[92m "Stream": "orange",[0m
+[33m[stage-41] [0m[92m "Messages": [[0m
+[33m[stage-41] [0m[92m {[0m
+[33m[stage-41] [0m[92m "ID": "0-2",[0m
+[33m[stage-41] [0m[92m "Values": {[0m
+[33m[stage-41] [0m[92m "humidity": "37"[0m
+[33m[stage-41] [0m[92m }[0m
+[33m[stage-41] [0m[92m }[0m
+[33m[stage-41] [0m[92m ][0m
+[33m[stage-41] [0m[92m }[0m
+[33m[stage-41] [0m[92m]"[0m
+[33m[stage-41] [0m[92mTest passed.[0m
+[33m[stage-41] [0m[36mTerminating program[0m
+[33m[stage-41] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-40] [0m[94mRunning tests for Stage #40: um0[0m
+[33m[stage-40] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-40] [0m[94m$ redis-cli xadd "apple" "0-1" "temperature 88"[0m
+[33m[stage-40] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-40] [0m[94m$ redis-cli xread streams "apple 0-0"[0m
+[33m[stage-40] [0m[92mReceived response: "[[0m
+[33m[stage-40] [0m[92m {[0m
+[33m[stage-40] [0m[92m "Stream": "apple",[0m
+[33m[stage-40] [0m[92m "Messages": [[0m
+[33m[stage-40] [0m[92m {[0m
+[33m[stage-40] [0m[92m "ID": "0-1",[0m
+[33m[stage-40] [0m[92m "Values": {[0m
+[33m[stage-40] [0m[92m "temperature": "88"[0m
+[33m[stage-40] [0m[92m }[0m
+[33m[stage-40] [0m[92m }[0m
+[33m[stage-40] [0m[92m ][0m
+[33m[stage-40] [0m[92m }[0m
+[33m[stage-40] [0m[92m]"[0m
+[33m[stage-40] [0m[92mTest passed.[0m
+[33m[stage-40] [0m[36mTerminating program[0m
+[33m[stage-40] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-39] [0m[94mRunning tests for Stage #39: fs1[0m
+[33m[stage-39] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-39] [0m[94m$ redis-cli xadd "apple" "0-1" "foo bar"[0m
+[33m[stage-39] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-39] [0m[94m$ redis-cli xadd "apple" "0-2" "foo bar"[0m
+[33m[stage-39] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-39] [0m[94m$ redis-cli xadd "apple" "0-3" "foo bar"[0m
+[33m[stage-39] [0m[92mReceived response: ""0-3""[0m
+[33m[stage-39] [0m[94m$ redis-cli xadd "apple" "0-4" "foo bar"[0m
+[33m[stage-39] [0m[92mReceived response: ""0-4""[0m
+[33m[stage-39] [0m[94m$ redis-cli xrange "apple" 0-2 +[0m
+[33m[stage-39] [0m[92mReceived response: "[[0m
+[33m[stage-39] [0m[92m {[0m
+[33m[stage-39] [0m[92m "ID": "0-2",[0m
+[33m[stage-39] [0m[92m "Values": {[0m
+[33m[stage-39] [0m[92m "foo": "bar"[0m
+[33m[stage-39] [0m[92m }[0m
+[33m[stage-39] [0m[92m },[0m
+[33m[stage-39] [0m[92m {[0m
+[33m[stage-39] [0m[92m "ID": "0-3",[0m
+[33m[stage-39] [0m[92m "Values": {[0m
+[33m[stage-39] [0m[92m "foo": "bar"[0m
+[33m[stage-39] [0m[92m }[0m
+[33m[stage-39] [0m[92m },[0m
+[33m[stage-39] [0m[92m {[0m
+[33m[stage-39] [0m[92m "ID": "0-4",[0m
+[33m[stage-39] [0m[92m "Values": {[0m
+[33m[stage-39] [0m[92m "foo": "bar"[0m
+[33m[stage-39] [0m[92m }[0m
+[33m[stage-39] [0m[92m }[0m
+[33m[stage-39] [0m[92m]"[0m
+[33m[stage-39] [0m[92mTest passed.[0m
+[33m[stage-39] [0m[36mTerminating program[0m
+[33m[stage-39] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-38] [0m[94mRunning tests for Stage #38: yp1[0m
+[33m[stage-38] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-38] [0m[94m$ redis-cli xadd "blueberry" "0-1" "foo bar"[0m
+[33m[stage-38] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-38] [0m[94m$ redis-cli xadd "blueberry" "0-2" "foo bar"[0m
+[33m[stage-38] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-38] [0m[94m$ redis-cli xadd "blueberry" "0-3" "foo bar"[0m
+[33m[stage-38] [0m[92mReceived response: ""0-3""[0m
+[33m[stage-38] [0m[94m$ redis-cli xadd "blueberry" "0-4" "foo bar"[0m
+[33m[stage-38] [0m[92mReceived response: ""0-4""[0m
+[33m[stage-38] [0m[94m$ redis-cli xrange "blueberry" - "0-3"[0m
+[33m[stage-38] [0m[92mReceived response: "[[0m
+[33m[stage-38] [0m[92m {[0m
+[33m[stage-38] [0m[92m "ID": "0-1",[0m
+[33m[stage-38] [0m[92m "Values": {[0m
+[33m[stage-38] [0m[92m "foo": "bar"[0m
+[33m[stage-38] [0m[92m }[0m
+[33m[stage-38] [0m[92m },[0m
+[33m[stage-38] [0m[92m {[0m
+[33m[stage-38] [0m[92m "ID": "0-2",[0m
+[33m[stage-38] [0m[92m "Values": {[0m
+[33m[stage-38] [0m[92m "foo": "bar"[0m
+[33m[stage-38] [0m[92m }[0m
+[33m[stage-38] [0m[92m },[0m
+[33m[stage-38] [0m[92m {[0m
+[33m[stage-38] [0m[92m "ID": "0-3",[0m
+[33m[stage-38] [0m[92m "Values": {[0m
+[33m[stage-38] [0m[92m "foo": "bar"[0m
+[33m[stage-38] [0m[92m }[0m
+[33m[stage-38] [0m[92m }[0m
+[33m[stage-38] [0m[92m]"[0m
+[33m[stage-38] [0m[92mTest passed.[0m
+[33m[stage-38] [0m[36mTerminating program[0m
+[33m[stage-38] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-37] [0m[94mRunning tests for Stage #37: zx1[0m
+[33m[stage-37] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-37] [0m[94m$ redis-cli xadd "grape" "0-1" "foo bar"[0m
+[33m[stage-37] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-37] [0m[94m$ redis-cli xadd "grape" "0-2" "foo bar"[0m
+[33m[stage-37] [0m[92mReceived response: ""0-2""[0m
+[33m[stage-37] [0m[94m$ redis-cli xadd "grape" "0-3" "foo bar"[0m
+[33m[stage-37] [0m[92mReceived response: ""0-3""[0m
+[33m[stage-37] [0m[94m$ redis-cli xadd "grape" "0-4" "foo bar"[0m
+[33m[stage-37] [0m[92mReceived response: ""0-4""[0m
+[33m[stage-37] [0m[94m$ redis-cli xrange "grape" 0-2 "0-4"[0m
+[33m[stage-37] [0m[92mReceived response: "[[0m
+[33m[stage-37] [0m[92m {[0m
+[33m[stage-37] [0m[92m "ID": "0-2",[0m
+[33m[stage-37] [0m[92m "Values": {[0m
+[33m[stage-37] [0m[92m "foo": "bar"[0m
+[33m[stage-37] [0m[92m }[0m
+[33m[stage-37] [0m[92m },[0m
+[33m[stage-37] [0m[92m {[0m
+[33m[stage-37] [0m[92m "ID": "0-3",[0m
+[33m[stage-37] [0m[92m "Values": {[0m
+[33m[stage-37] [0m[92m "foo": "bar"[0m
+[33m[stage-37] [0m[92m }[0m
+[33m[stage-37] [0m[92m },[0m
+[33m[stage-37] [0m[92m {[0m
+[33m[stage-37] [0m[92m "ID": "0-4",[0m
+[33m[stage-37] [0m[92m "Values": {[0m
+[33m[stage-37] [0m[92m "foo": "bar"[0m
+[33m[stage-37] [0m[92m }[0m
+[33m[stage-37] [0m[92m }[0m
+[33m[stage-37] [0m[92m]"[0m
+[33m[stage-37] [0m[92mTest passed.[0m
+[33m[stage-37] [0m[36mTerminating program[0m
+[33m[stage-37] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-36] [0m[94mRunning tests for Stage #36: xu6[0m
+[33m[stage-36] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-36] [0m[94m$ redis-cli xadd "pear" * foo bar[0m
+[33m[stage-36] [0m[94mReceived response: ""1718383812190-0""[0m
+[33m[stage-36] [0m[92mThe first part of the ID is a valid unix milliseconds timestamp[0m
+[33m[stage-36] [0m[92mThe second part of the ID is a valid sequence number[0m
+[33m[stage-36] [0m[92mTest passed.[0m
+[33m[stage-36] [0m[36mTerminating program[0m
+[33m[stage-36] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-35] [0m[94mRunning tests for Stage #35: yh3[0m
+[33m[stage-35] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-35] [0m[94m$ redis-cli xadd "raspberry" "0-*" "foo bar"[0m
+[33m[stage-35] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-35] [0m[94m$ redis-cli xadd "raspberry" "1-*" "foo bar"[0m
+[33m[stage-35] [0m[92mReceived response: ""1-0""[0m
+[33m[stage-35] [0m[94m$ redis-cli xadd "raspberry" "1-*" "bar baz"[0m
+[33m[stage-35] [0m[92mReceived response: ""1-1""[0m
+[33m[stage-35] [0m[92mTest passed.[0m
+[33m[stage-35] [0m[36mTerminating program[0m
+[33m[stage-35] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-34] [0m[94mRunning tests for Stage #34: hq8[0m
+[33m[stage-34] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-34] [0m[94m$ redis-cli xadd "blueberry" "1-1" "foo bar"[0m
+[33m[stage-34] [0m[92mReceived response: ""1-1""[0m
+[33m[stage-34] [0m[94m$ redis-cli xadd "blueberry" "1-2" "bar baz"[0m
+[33m[stage-34] [0m[92mReceived response: ""1-2""[0m
+[33m[stage-34] [0m[94m$ redis-cli xadd "blueberry" "1-2" "baz foo"[0m
+[33m[stage-34] [0m[92mReceived error: ""ERR The ID specified in XADD is equal or smaller than the target stream top item""[0m
+[33m[stage-34] [0m[94m$ redis-cli xadd "blueberry" "0-3" "baz foo"[0m
+[33m[stage-34] [0m[92mReceived error: ""ERR The ID specified in XADD is equal or smaller than the target stream top item""[0m
+[33m[stage-34] [0m[94m$ redis-cli xadd "blueberry" "0-0" "baz foo"[0m
+[33m[stage-34] [0m[92mReceived error: ""ERR The ID specified in XADD must be greater than 0-0""[0m
+[33m[stage-34] [0m[92mTest passed.[0m
+[33m[stage-34] [0m[36mTerminating program[0m
+[33m[stage-34] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-33] [0m[94mRunning tests for Stage #33: cf6[0m
+[33m[stage-33] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-33] [0m[94m$ redis-cli xadd "blueberry" "0-1" "foo bar"[0m
+[33m[stage-33] [0m[92mReceived response: ""0-1""[0m
+[33m[stage-33] [0m[94m$ redis-cli type "blueberry"[0m
+[33m[stage-33] [0m[92mType of "blueberry" is "stream"[0m
+[33m[stage-33] [0m[92mTest passed.[0m
+[33m[stage-33] [0m[36mTerminating program[0m
+[33m[stage-33] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-32] [0m[94mRunning tests for Stage #32: cc3[0m
+[33m[stage-32] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-32] [0m[94m$ redis-cli set "mango" "banana"[0m
+[33m[stage-32] [0m[92mReceived response: ""OK""[0m
+[33m[stage-32] [0m[94m$ redis-cli type "mango"[0m
+[33m[stage-32] [0m[92mType of "mango" is "string"[0m
+[33m[stage-32] [0m[94m$ redis-cli type "missing_key_banana"[0m
+[33m[stage-32] [0m[92mType of missing_key_"banana" is "none"[0m
+[33m[stage-32] [0m[92mTest passed.[0m
+[33m[stage-32] [0m[36mTerminating program[0m
+[33m[stage-32] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-31] [0m[94mRunning tests for Stage #31: na2[0m
+[33m[stage-31] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-31] [0m[94mProceeding to create 4 replicas.[0m
+[33m[stage-31] [0m[36mCreating replica: 1[0m
+[33m[stage-31] [0m[94mreplica-1: $ redis-cli PING[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "PONG"[0m
+[33m[stage-31] [0m[92mReceived "PONG"[0m
+[33m[stage-31] [0m[94mreplica-1: > REPLCONF listening-port 6380[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-1: > REPLCONF capa psync2[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-1: > PSYNC ? -1[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[36mReading RDB file...[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc4tlf\xfa\bused-mem\xc20\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xe4\x986i\xa6\x02\xe0\xc3"[0m
+[33m[stage-31] [0m[92mReceived RDB file[0m
+[33m[stage-31] [0m[36mCreating replica: 2[0m
+[33m[stage-31] [0m[94mreplica-2: $ redis-cli PING[0m
+[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "+PONG\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "PONG"[0m
+[33m[stage-31] [0m[92mReceived "PONG"[0m
+[33m[stage-31] [0m[94mreplica-2: > REPLCONF listening-port 6381[0m
+[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6381\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-2: > REPLCONF capa psync2[0m
+[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-2: > PSYNC ? -1[0m
+[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[36mReading RDB file...[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc4tlf\xfa\bused-mem\xc2\xc0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffM\x8d\xa1n^\xaf.v"[0m
+[33m[stage-31] [0m[92mReceived RDB file[0m
+[33m[stage-31] [0m[36mCreating replica: 3[0m
+[33m[stage-31] [0m[94mreplica-3: $ redis-cli PING[0m
+[33m[stage-31] [0m[36mreplica-3: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "+PONG\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "PONG"[0m
+[33m[stage-31] [0m[92mReceived "PONG"[0m
+[33m[stage-31] [0m[94mreplica-3: > REPLCONF listening-port 6382[0m
+[33m[stage-31] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6382\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-3: > REPLCONF capa psync2[0m
+[33m[stage-31] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-3: > PSYNC ? -1[0m
+[33m[stage-31] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[36mReading RDB file...[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc4tlf\xfa\bused-mem\xc2\xc0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffu\xaa9&\xb7`\xb9X"[0m
+[33m[stage-31] [0m[92mReceived RDB file[0m
+[33m[stage-31] [0m[36mCreating replica: 4[0m
+[33m[stage-31] [0m[94mreplica-4: $ redis-cli PING[0m
+[33m[stage-31] [0m[36mreplica-4: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "+PONG\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP simple string: "PONG"[0m
+[33m[stage-31] [0m[92mReceived "PONG"[0m
+[33m[stage-31] [0m[94mreplica-4: > REPLCONF listening-port 6383[0m
+[33m[stage-31] [0m[36mreplica-4: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6383\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-4: > REPLCONF capa psync2[0m
+[33m[stage-31] [0m[36mreplica-4: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mreplica-4: > PSYNC ? -1[0m
+[33m[stage-31] [0m[36mreplica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "+FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP simple string: "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[92mReceived "FULLRESYNC 1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7 0"[0m
+[33m[stage-31] [0m[36mReading RDB file...[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc5tlf\xfa\bused-mem\xc2Ћ\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1c06ed29c4a083a5302082fabaa3a0b91c9a3bf7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffDj\xe05Z\xab\xfa."[0m
+[33m[stage-31] [0m[92mReceived RDB file[0m
+[33m[stage-31] [0m[94mclient: $ redis-cli SET foo 123[0m
+[33m[stage-31] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mclient: > WAIT 1 500[0m
+[33m[stage-31] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n1\r\n$3\r\n500\r\n"[0m
+[33m[stage-31] [0m[94mTesting Replica : 1[0m
+[33m[stage-31] [0m[94mreplica-1: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[94mreplica-1: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-1: Sending ACK to Master[0m
+[33m[stage-31] [0m[94mreplica-1: $ redis-cli REPLCONF ACK 54[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$2\r\n54\r\n"[0m
+[33m[stage-31] [0m[94mTesting Replica : 2[0m
+[33m[stage-31] [0m[94mreplica-2: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[94mreplica-2: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-2: Not sending ACK to Master[0m
+[33m[stage-31] [0m[94mTesting Replica : 3[0m
+[33m[stage-31] [0m[94mreplica-3: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[94mreplica-3: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-3: Not sending ACK to Master[0m
+[33m[stage-31] [0m[94mTesting Replica : 4[0m
+[33m[stage-31] [0m[94mreplica-4: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-31] [0m[94mreplica-4: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-4: Not sending ACK to Master[0m
+[33m[stage-31] [0m[36mclient: Received bytes: ":1\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received RESP integer: 1[0m
+[33m[stage-31] [0m[92mPassed first WAIT test.[0m
+[33m[stage-31] [0m[94mclient: > SET baz 789[0m
+[33m[stage-31] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-31] [0m[92mReceived "OK"[0m
+[33m[stage-31] [0m[94mclient: > WAIT 3 2000[0m
+[33m[stage-31] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$4\r\n2000\r\n"[0m
+[33m[stage-31] [0m[94mTesting Replica : 1[0m
+[33m[stage-31] [0m[94mreplica-1: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[94mreplica-1: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-1: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-1: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-1: Sending ACK to Master[0m
+[33m[stage-31] [0m[94mreplica-1: > REPLCONF ACK 122[0m
+[33m[stage-31] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$3\r\n122\r\n"[0m
+[33m[stage-31] [0m[94mTesting Replica : 2[0m
+[33m[stage-31] [0m[94mreplica-2: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[94mreplica-2: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-2: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-2: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-2: Sending ACK to Master[0m
+[33m[stage-31] [0m[94mreplica-2: $ redis-cli REPLCONF ACK 122[0m
+[33m[stage-31] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$3\r\n122\r\n"[0m
+[33m[stage-31] [0m[94mTesting Replica : 3[0m
+[33m[stage-31] [0m[94mreplica-3: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[94mreplica-3: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-3: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-3: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-3: Not sending ACK to Master[0m
+[33m[stage-31] [0m[94mTesting Replica : 4[0m
+[33m[stage-31] [0m[94mreplica-4: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-31] [0m[94mreplica-4: Expecting "REPLCONF GETACK *" from Master[0m
+[33m[stage-31] [0m[36mreplica-4: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-31] [0m[36mreplica-4: Received RESP array: ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[92mReceived ["REPLCONF", "GETACK", "*"][0m
+[33m[stage-31] [0m[36mreplica-4: Not sending ACK to Master[0m
+[33m[stage-31] [0m[36mclient: Received bytes: ":2\r\n"[0m
+[33m[stage-31] [0m[36mclient: Received RESP integer: 2[0m
+[33m[stage-31] [0m[94mWAIT command returned after 2097 ms[0m
+[33m[stage-31] [0m[92mTest passed.[0m
+[33m[stage-31] [0m[36mTerminating program[0m
+[33m[stage-31] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-30] [0m[94mRunning tests for Stage #30: tu8[0m
+[33m[stage-30] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-30] [0m[94mProceeding to create 6 replicas.[0m
+[33m[stage-30] [0m[36mCreating replica: 1[0m
+[33m[stage-30] [0m[94mreplica-1: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-1: > REPLCONF listening-port 6380[0m
+[33m[stage-30] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-1: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-1: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem\xc2\x10\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x00\xa4\x1fh\xdd\xc0\x9e\x9e"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[36mCreating replica: 2[0m
+[33m[stage-30] [0m[94mreplica-2: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-2: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-2: > REPLCONF listening-port 6381[0m
+[33m[stage-30] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6381\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-2: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-2: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem\u00a0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffKW\xb88\xbb\xa4\xea\xc7"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[36mCreating replica: 3[0m
+[33m[stage-30] [0m[94mreplica-3: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-3: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-3: > REPLCONF listening-port 6382[0m
+[33m[stage-30] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6382\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-3: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-3: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem\u00a0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffsp pRk}\xe9"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[36mCreating replica: 4[0m
+[33m[stage-30] [0m[94mreplica-4: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-4: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-4: > REPLCONF listening-port 6383[0m
+[33m[stage-30] [0m[36mreplica-4: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6383\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-4: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-4: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-4: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-4: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem°\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb7E\xa1\aD\x11hA"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[36mCreating replica: 5[0m
+[33m[stage-30] [0m[94mreplica-5: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-5: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-5: > REPLCONF listening-port 6384[0m
+[33m[stage-30] [0m[36mreplica-5: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6384\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-5: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-5: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-5: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-5: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-5: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-5: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem\xc2\xc0\xd6\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffT$н\xefh\x02\xe7"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[36mCreating replica: 6[0m
+[33m[stage-30] [0m[94mreplica-6: $ redis-cli PING[0m
+[33m[stage-30] [0m[36mreplica-6: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received bytes: "+PONG\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received RESP simple string: "PONG"[0m
+[33m[stage-30] [0m[92mReceived "PONG"[0m
+[33m[stage-30] [0m[94mreplica-6: > REPLCONF listening-port 6385[0m
+[33m[stage-30] [0m[36mreplica-6: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6385\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-6: > REPLCONF capa psync2[0m
+[33m[stage-30] [0m[36mreplica-6: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received bytes: "+OK\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received RESP simple string: "OK"[0m
+[33m[stage-30] [0m[92mReceived "OK"[0m
+[33m[stage-30] [0m[94mreplica-6: > PSYNC ? -1[0m
+[33m[stage-30] [0m[36mreplica-6: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received bytes: "+FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0\r\n"[0m
+[33m[stage-30] [0m[36mreplica-6: Received RESP simple string: "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[92mReceived "FULLRESYNC 5375b7c06be89997dbda6de1083a664bddf749a7 0"[0m
+[33m[stage-30] [0m[36mReading RDB file...[0m
+[33m[stage-30] [0m[36mreplica-6: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc7tlf\xfa\bused-mem\xc2\xc0!\x14\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5375b7c06be89997dbda6de1083a664bddf749a7\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff8^pfO6R\xe7"[0m
+[33m[stage-30] [0m[92mReceived RDB file[0m
+[33m[stage-30] [0m[94mclient: $ redis-cli WAIT 3 500[0m
+[33m[stage-30] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received bytes: ":6\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received RESP integer: 6[0m
+[33m[stage-30] [0m[92mReceived 6[0m
+[33m[stage-30] [0m[94mclient: > WAIT 5 500[0m
+[33m[stage-30] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n5\r\n$3\r\n500\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received bytes: ":6\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received RESP integer: 6[0m
+[33m[stage-30] [0m[92mReceived 6[0m
+[33m[stage-30] [0m[94mclient: > WAIT 7 500[0m
+[33m[stage-30] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n7\r\n$3\r\n500\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received bytes: ":6\r\n"[0m
+[33m[stage-30] [0m[36mclient: Received RESP integer: 6[0m
+[33m[stage-30] [0m[92mReceived 6[0m
+[33m[stage-30] [0m[92mTest passed.[0m
+[33m[stage-30] [0m[36mTerminating program[0m
+[33m[stage-30] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-29] [0m[94mRunning tests for Stage #29: my8[0m
+[33m[stage-29] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-29] [0m[94mclient: $ redis-cli WAIT 0 60000[0m
+[33m[stage-29] [0m[36mclient: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n0\r\n$5\r\n60000\r\n"[0m
+[33m[stage-29] [0m[36mclient: Received bytes: ":0\r\n"[0m
+[33m[stage-29] [0m[36mclient: Received RESP integer: 0[0m
+[33m[stage-29] [0m[92mReceived 0[0m
+[33m[stage-29] [0m[92mTest passed.[0m
+[33m[stage-29] [0m[36mTerminating program[0m
+[33m[stage-29] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-28] [0m[94mRunning tests for Stage #28: yd3[0m
+[33m[stage-28] [0m[94mMaster is running on port 6379[0m
+[33m[stage-28] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-28] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-28] [0m[92mReceived ["PING"][0m
+[33m[stage-28] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-28] [0m[94mmaster: Waiting for replica to send "REPLCONF listening-port 6380" command[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-28] [0m[92mReceived ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-28] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-28] [0m[94mmaster: Waiting for replica to send "REPLCONF capa" command[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-28] [0m[92mReceived ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-28] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-28] [0m[94mmaster: Waiting for replica to send "PSYNC" command[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["PSYNC", "?", "-1"][0m
+[33m[stage-28] [0m[92mReceived ["PSYNC", "?", "-1"][0m
+[33m[stage-28] [0m[94mmaster: Sent "FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0"[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "+FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0\r\n"[0m
+[33m[stage-28] [0m[36mSending RDB file...[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "$88\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2m\b\xbce\xfa\bused-mem°\xc4\x10\x00\xfa\baof-base\xc0\x00\xff\xf0n;\xfe\xc0\xffZ\xa2"[0m
+[33m[stage-28] [0m[92mSent RDB file.[0m
+[33m[stage-28] [0m[94mmaster: $ redis-cli REPLCONF GETACK *[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$1\r\n0\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["REPLCONF", "ACK", "0"][0m
+[33m[stage-28] [0m[92mReceived ["REPLCONF", "ACK", "0"][0m
+[33m[stage-28] [0m[94mmaster: > PING[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-28] [0m[94mmaster: > REPLCONF GETACK *[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$2\r\n51\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["REPLCONF", "ACK", "51"][0m
+[33m[stage-28] [0m[92mReceived ["REPLCONF", "ACK", "51"][0m
+[33m[stage-28] [0m[94mmaster: > SET banana banana[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*3\r\n$3\r\nSET\r\n$6\r\nbanana\r\n$6\r\nbanana\r\n"[0m
+[33m[stage-28] [0m[94mmaster: > SET blueberry orange[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*3\r\n$3\r\nSET\r\n$9\r\nblueberry\r\n$6\r\norange\r\n"[0m
+[33m[stage-28] [0m[94mmaster: > REPLCONF GETACK *[0m
+[33m[stage-28] [0m[36mmaster: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$3\r\n165\r\n"[0m
+[33m[stage-28] [0m[36mmaster: Received RESP array: ["REPLCONF", "ACK", "165"][0m
+[33m[stage-28] [0m[92mReceived ["REPLCONF", "ACK", "165"][0m
+[33m[stage-28] [0m[92mTest passed.[0m
+[33m[stage-28] [0m[36mTerminating program[0m
+[33m[stage-28] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-27] [0m[94mRunning tests for Stage #27: xv6[0m
+[33m[stage-27] [0m[94mMaster is running on port 6379[0m
+[33m[stage-27] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-27] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-27] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-27] [0m[92mReceived ["PING"][0m
+[33m[stage-27] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-27] [0m[94mmaster: Waiting for replica to send "REPLCONF listening-port 6380" command[0m
+[33m[stage-27] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-27] [0m[92mReceived ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-27] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-27] [0m[94mmaster: Waiting for replica to send "REPLCONF capa" command[0m
+[33m[stage-27] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-27] [0m[92mReceived ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-27] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-27] [0m[94mmaster: Waiting for replica to send "PSYNC" command[0m
+[33m[stage-27] [0m[36mmaster: Received bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received RESP array: ["PSYNC", "?", "-1"][0m
+[33m[stage-27] [0m[92mReceived ["PSYNC", "?", "-1"][0m
+[33m[stage-27] [0m[94mmaster: Sent "FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0"[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "+FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0\r\n"[0m
+[33m[stage-27] [0m[36mSending RDB file...[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "$88\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2m\b\xbce\xfa\bused-mem°\xc4\x10\x00\xfa\baof-base\xc0\x00\xff\xf0n;\xfe\xc0\xffZ\xa2"[0m
+[33m[stage-27] [0m[92mSent RDB file.[0m
+[33m[stage-27] [0m[94mmaster: > REPLCONF GETACK *[0m
+[33m[stage-27] [0m[36mmaster: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$1\r\n0\r\n"[0m
+[33m[stage-27] [0m[36mmaster: Received RESP array: ["REPLCONF", "ACK", "0"][0m
+[33m[stage-27] [0m[92mReceived ["REPLCONF", "ACK", "0"][0m
+[33m[stage-27] [0m[92mTest passed.[0m
+[33m[stage-27] [0m[36mTerminating program[0m
+[33m[stage-27] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-26] [0m[94mRunning tests for Stage #26: yg4[0m
+[33m[stage-26] [0m[94mMaster is running on port 6379[0m
+[33m[stage-26] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-26] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-26] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-26] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-26] [0m[92mReceived ["PING"][0m
+[33m[stage-26] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-26] [0m[94mmaster: Waiting for replica to send "REPLCONF listening-port 6380" command[0m
+[33m[stage-26] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-26] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-26] [0m[92mReceived ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-26] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-26] [0m[94mmaster: Waiting for replica to send "REPLCONF capa" command[0m
+[33m[stage-26] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-26] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-26] [0m[92mReceived ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-26] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-26] [0m[94mmaster: Waiting for replica to send "PSYNC" command[0m
+[33m[stage-26] [0m[36mmaster: Received bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-26] [0m[36mmaster: Received RESP array: ["PSYNC", "?", "-1"][0m
+[33m[stage-26] [0m[92mReceived ["PSYNC", "?", "-1"][0m
+[33m[stage-26] [0m[94mmaster: Sent "FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0"[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "+FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0\r\n"[0m
+[33m[stage-26] [0m[36mSending RDB file...[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "$88\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2m\b\xbce\xfa\bused-mem°\xc4\x10\x00\xfa\baof-base\xc0\x00\xff\xf0n;\xfe\xc0\xffZ\xa2"[0m
+[33m[stage-26] [0m[92mSent RDB file.[0m
+[33m[stage-26] [0m[94mmaster: > SET foo 123[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-26] [0m[94mmaster: > SET bar 456[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-26] [0m[94mmaster: > SET baz 789[0m
+[33m[stage-26] [0m[36mmaster: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-26] [0m[94mGetting key foo[0m
+[33m[stage-26] [0m[94mclient: $ redis-cli GET foo[0m
+[33m[stage-26] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$3\r\nfoo\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received bytes: "$3\r\n123\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received RESP bulk string: "123"[0m
+[33m[stage-26] [0m[92mReceived "123"[0m
+[33m[stage-26] [0m[94mGetting key bar[0m
+[33m[stage-26] [0m[94mclient: > GET bar[0m
+[33m[stage-26] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$3\r\nbar\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received bytes: "$3\r\n456\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received RESP bulk string: "456"[0m
+[33m[stage-26] [0m[92mReceived "456"[0m
+[33m[stage-26] [0m[94mGetting key baz[0m
+[33m[stage-26] [0m[94mclient: > GET baz[0m
+[33m[stage-26] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$3\r\nbaz\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received bytes: "$3\r\n789\r\n"[0m
+[33m[stage-26] [0m[36mclient: Received RESP bulk string: "789"[0m
+[33m[stage-26] [0m[92mReceived "789"[0m
+[33m[stage-26] [0m[92mTest passed.[0m
+[33m[stage-26] [0m[36mTerminating program[0m
+[33m[stage-26] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-25] [0m[94mRunning tests for Stage #25: hd5[0m
+[33m[stage-25] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-25] [0m[36mCreating replica: 1[0m
+[33m[stage-25] [0m[94mreplica-1: $ redis-cli PING[0m
+[33m[stage-25] [0m[36mreplica-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "PONG"[0m
+[33m[stage-25] [0m[92mReceived "PONG"[0m
+[33m[stage-25] [0m[94mreplica-1: > REPLCONF listening-port 6380[0m
+[33m[stage-25] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-1: > REPLCONF capa psync2[0m
+[33m[stage-25] [0m[36mreplica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-1: > PSYNC ? -1[0m
+[33m[stage-25] [0m[36mreplica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "+FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP simple string: "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[36mReading RDB file...[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc9tlf\xfa\bused-mem\u00a0S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2e58128f42dc607c41d060c0144f89740dd79c29\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xde0\xf4_xg\x18\xd1"[0m
+[33m[stage-25] [0m[92mReceived RDB file[0m
+[33m[stage-25] [0m[36mCreating replica: 2[0m
+[33m[stage-25] [0m[94mreplica-2: $ redis-cli PING[0m
+[33m[stage-25] [0m[36mreplica-2: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "+PONG\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "PONG"[0m
+[33m[stage-25] [0m[92mReceived "PONG"[0m
+[33m[stage-25] [0m[94mreplica-2: > REPLCONF listening-port 6381[0m
+[33m[stage-25] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6381\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-2: > REPLCONF capa psync2[0m
+[33m[stage-25] [0m[36mreplica-2: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-2: > PSYNC ? -1[0m
+[33m[stage-25] [0m[36mreplica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "+FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP simple string: "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[36mReading RDB file...[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc9tlf\xfa\bused-mem\xc2\x10;\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2e58128f42dc607c41d060c0144f89740dd79c29\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff[kq\x1a塨\v"[0m
+[33m[stage-25] [0m[92mReceived RDB file[0m
+[33m[stage-25] [0m[36mCreating replica: 3[0m
+[33m[stage-25] [0m[94mreplica-3: $ redis-cli PING[0m
+[33m[stage-25] [0m[36mreplica-3: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "+PONG\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "PONG"[0m
+[33m[stage-25] [0m[92mReceived "PONG"[0m
+[33m[stage-25] [0m[94mreplica-3: > REPLCONF listening-port 6382[0m
+[33m[stage-25] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6382\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-3: > REPLCONF capa psync2[0m
+[33m[stage-25] [0m[36mreplica-3: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mreplica-3: > PSYNC ? -1[0m
+[33m[stage-25] [0m[36mreplica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "+FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP simple string: "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[92mReceived "FULLRESYNC 2e58128f42dc607c41d060c0144f89740dd79c29 0"[0m
+[33m[stage-25] [0m[36mReading RDB file...[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc9tlf\xfa\bused-mem\xc2 J\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2e58128f42dc607c41d060c0144f89740dd79c29\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x7f\xb6C\xe0\x06r\xa6\xda"[0m
+[33m[stage-25] [0m[92mReceived RDB file[0m
+[33m[stage-25] [0m[94mclient: $ redis-cli SET foo 123[0m
+[33m[stage-25] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mclient: > SET bar 456[0m
+[33m[stage-25] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mclient: > SET baz 789[0m
+[33m[stage-25] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-25] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-25] [0m[92mReceived "OK"[0m
+[33m[stage-25] [0m[94mTesting Replica: 1/3[0m
+[33m[stage-25] [0m[94mreplica-1: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[94mreplica-1: Expecting "SET bar 456" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP array: ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[94mreplica-1: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-25] [0m[36mreplica-1: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[94mTesting Replica: 2/3[0m
+[33m[stage-25] [0m[94mreplica-2: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[94mreplica-2: Expecting "SET bar 456" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP array: ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[94mreplica-2: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-2: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-25] [0m[36mreplica-2: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[94mTesting Replica: 3/3[0m
+[33m[stage-25] [0m[94mreplica-3: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-25] [0m[94mreplica-3: Expecting "SET bar 456" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP array: ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "bar", "456"][0m
+[33m[stage-25] [0m[94mreplica-3: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-25] [0m[36mreplica-3: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-25] [0m[36mreplica-3: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-25] [0m[92mTest passed.[0m
+[33m[stage-25] [0m[36mTerminating program[0m
+[33m[stage-25] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-24] [0m[94mRunning tests for Stage #24: zn8[0m
+[33m[stage-24] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-24] [0m[94mreplica: $ redis-cli PING[0m
+[33m[stage-24] [0m[36mreplica: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "+PONG\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP simple string: "PONG"[0m
+[33m[stage-24] [0m[92mReceived "PONG"[0m
+[33m[stage-24] [0m[94mreplica: > REPLCONF listening-port 6380[0m
+[33m[stage-24] [0m[36mreplica: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "+OK\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP simple string: "OK"[0m
+[33m[stage-24] [0m[92mReceived "OK"[0m
+[33m[stage-24] [0m[94mreplica: > REPLCONF capa psync2[0m
+[33m[stage-24] [0m[36mreplica: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "+OK\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP simple string: "OK"[0m
+[33m[stage-24] [0m[92mReceived "OK"[0m
+[33m[stage-24] [0m[94mreplica: > PSYNC ? -1[0m
+[33m[stage-24] [0m[36mreplica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "+FULLRESYNC fb217523f2c9c301e3804564b643014400411d9b 0\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP simple string: "FULLRESYNC fb217523f2c9c301e3804564b643014400411d9b 0"[0m
+[33m[stage-24] [0m[92mReceived "FULLRESYNC fb217523f2c9c301e3804564b643014400411d9b 0"[0m
+[33m[stage-24] [0m[36mReading RDB file...[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xc9tlf\xfa\bused-mem\xc2\xc0S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(fb217523f2c9c301e3804564b643014400411d9b\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffn\xff\b\xcdI\xcb\xc0a"[0m
+[33m[stage-24] [0m[92mReceived RDB file[0m
+[33m[stage-24] [0m[94mclient: $ redis-cli SET foo 123[0m
+[33m[stage-24] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-24] [0m[92mReceived "OK"[0m
+[33m[stage-24] [0m[94mclient: > SET bar 456[0m
+[33m[stage-24] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-24] [0m[92mReceived "OK"[0m
+[33m[stage-24] [0m[94mclient: > SET baz 789[0m
+[33m[stage-24] [0m[36mclient: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-24] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-24] [0m[92mReceived "OK"[0m
+[33m[stage-24] [0m[92mSent 3 SET commands to master successfully.[0m
+[33m[stage-24] [0m[94mreplica: Expecting "SET foo 123" to be propagated[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP array: ["SELECT", "0"][0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP array: ["SET", "foo", "123"][0m
+[33m[stage-24] [0m[92mReceived ["SET", "foo", "123"][0m
+[33m[stage-24] [0m[94mreplica: Expecting "SET bar 456" to be propagated[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP array: ["SET", "bar", "456"][0m
+[33m[stage-24] [0m[92mReceived ["SET", "bar", "456"][0m
+[33m[stage-24] [0m[94mreplica: Expecting "SET baz 789" to be propagated[0m
+[33m[stage-24] [0m[36mreplica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"[0m
+[33m[stage-24] [0m[36mreplica: Received RESP array: ["SET", "baz", "789"][0m
+[33m[stage-24] [0m[92mReceived ["SET", "baz", "789"][0m
+[33m[stage-24] [0m[92mTest passed.[0m
+[33m[stage-24] [0m[36mTerminating program[0m
+[33m[stage-24] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-23] [0m[94mRunning tests for Stage #23: cf8[0m
+[33m[stage-23] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-23] [0m[94mclient: $ redis-cli PING[0m
+[33m[stage-23] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "+PONG\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received RESP simple string: "PONG"[0m
+[33m[stage-23] [0m[92mReceived "PONG"[0m
+[33m[stage-23] [0m[94mclient: > REPLCONF listening-port 6380[0m
+[33m[stage-23] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-23] [0m[92mReceived "OK"[0m
+[33m[stage-23] [0m[94mclient: > REPLCONF capa psync2[0m
+[33m[stage-23] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-23] [0m[92mReceived "OK"[0m
+[33m[stage-23] [0m[94mclient: > PSYNC ? -1[0m
+[33m[stage-23] [0m[36mclient: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "+FULLRESYNC 4a683405a76db69b468112e12b5244236490dbac 0\r\n"[0m
+[33m[stage-23] [0m[36mclient: Received RESP simple string: "FULLRESYNC 4a683405a76db69b468112e12b5244236490dbac 0"[0m
+[33m[stage-23] [0m[92mReceived "FULLRESYNC 4a683405a76db69b468112e12b5244236490dbac 0"[0m
+[33m[stage-23] [0m[36mReading RDB file...[0m
+[33m[stage-23] [0m[36mclient: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.4\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2\xcatlf\xfa\bused-mem\xc2\xf0\r\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4a683405a76db69b468112e12b5244236490dbac\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffm\xdc\xf5\xc2b\xd08\xfb"[0m
+[33m[stage-23] [0m[92mReceived RDB file[0m
+[33m[stage-23] [0m[92mTest passed.[0m
+[33m[stage-23] [0m[36mTerminating program[0m
+[33m[stage-23] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-22] [0m[94mRunning tests for Stage #22: vm3[0m
+[33m[stage-22] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-22] [0m[94mclient: $ redis-cli PING[0m
+[33m[stage-22] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received bytes: "+PONG\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received RESP simple string: "PONG"[0m
+[33m[stage-22] [0m[92mReceived "PONG"[0m
+[33m[stage-22] [0m[94mclient: > REPLCONF listening-port 6380[0m
+[33m[stage-22] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-22] [0m[92mReceived "OK"[0m
+[33m[stage-22] [0m[94mclient: > REPLCONF capa psync2[0m
+[33m[stage-22] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-22] [0m[92mReceived "OK"[0m
+[33m[stage-22] [0m[94mclient: > PSYNC ? -1[0m
+[33m[stage-22] [0m[36mclient: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received bytes: "+FULLRESYNC 378cc0e01a8107822ffb083ff497644efb3d0d21 0\r\n"[0m
+[33m[stage-22] [0m[36mclient: Received RESP simple string: "FULLRESYNC 378cc0e01a8107822ffb083ff497644efb3d0d21 0"[0m
+[33m[stage-22] [0m[92mReceived "FULLRESYNC 378cc0e01a8107822ffb083ff497644efb3d0d21 0"[0m
+[33m[stage-22] [0m[92mTest passed.[0m
+[33m[stage-22] [0m[36mTerminating program[0m
+[33m[stage-22] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-21] [0m[94mRunning tests for Stage #21: fj0[0m
+[33m[stage-21] [0m[94m$ ./spawn_redis_server.sh --port 6379[0m
+[33m[stage-21] [0m[94mclient: $ redis-cli PING[0m
+[33m[stage-21] [0m[36mclient: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received bytes: "+PONG\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received RESP simple string: "PONG"[0m
+[33m[stage-21] [0m[92mReceived "PONG"[0m
+[33m[stage-21] [0m[94mclient: > REPLCONF listening-port 6380[0m
+[33m[stage-21] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-21] [0m[92mReceived "OK"[0m
+[33m[stage-21] [0m[94mclient: > REPLCONF capa psync2[0m
+[33m[stage-21] [0m[36mclient: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received bytes: "+OK\r\n"[0m
+[33m[stage-21] [0m[36mclient: Received RESP simple string: "OK"[0m
+[33m[stage-21] [0m[92mReceived "OK"[0m
+[33m[stage-21] [0m[92mTest passed.[0m
+[33m[stage-21] [0m[36mTerminating program[0m
+[33m[stage-21] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-20] [0m[94mRunning tests for Stage #20: ju6[0m
+[33m[stage-20] [0m[94mMaster is running on port 6379[0m
+[33m[stage-20] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-20] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-20] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-20] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-20] [0m[92mReceived ["PING"][0m
+[33m[stage-20] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-20] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-20] [0m[94mmaster: Waiting for replica to send "REPLCONF listening-port 6380" command[0m
+[33m[stage-20] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-20] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-20] [0m[92mReceived ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-20] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-20] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-20] [0m[94mmaster: Waiting for replica to send "REPLCONF capa" command[0m
+[33m[stage-20] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-20] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-20] [0m[92mReceived ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-20] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-20] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-20] [0m[94mmaster: Waiting for replica to send "PSYNC" command[0m
+[33m[stage-20] [0m[36mmaster: Received bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-20] [0m[36mmaster: Received RESP array: ["PSYNC", "?", "-1"][0m
+[33m[stage-20] [0m[92mReceived ["PSYNC", "?", "-1"][0m
+[33m[stage-20] [0m[94mmaster: Sent "FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0"[0m
+[33m[stage-20] [0m[36mmaster: Sent bytes: "+FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0\r\n"[0m
+[33m[stage-20] [0m[92mTest passed.[0m
+[33m[stage-20] [0m[36mTerminating program[0m
+[33m[stage-20] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-19] [0m[94mRunning tests for Stage #19: eh4[0m
+[33m[stage-19] [0m[94mMaster is running on port 6379[0m
+[33m[stage-19] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-19] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-19] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-19] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-19] [0m[92mReceived ["PING"][0m
+[33m[stage-19] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-19] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-19] [0m[94mmaster: Waiting for replica to send "REPLCONF listening-port 6380" command[0m
+[33m[stage-19] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-19] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-19] [0m[92mReceived ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-19] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-19] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-19] [0m[94mmaster: Waiting for replica to send "REPLCONF capa" command[0m
+[33m[stage-19] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-19] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-19] [0m[92mReceived ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-19] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-19] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-19] [0m[92mTest passed.[0m
+[33m[stage-19] [0m[36mTerminating program[0m
+[33m[stage-19] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-18] [0m[94mRunning tests for Stage #18: gl7[0m
+[33m[stage-18] [0m[94mMaster is running on port 6379.[0m
+[33m[stage-18] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-18] [0m[94mmaster: Waiting for replica to initiate handshake with "PING" command[0m
+[33m[stage-18] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-18] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-18] [0m[92mReceived ["PING"][0m
+[33m[stage-18] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-18] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-18] [0m[92mTest passed.[0m
+[33m[stage-18] [0m[36mTerminating program[0m
+[33m[stage-18] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-17] [0m[94mRunning tests for Stage #17: xc1[0m
+[33m[stage-17] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-17] [0m[94mclient: $ redis-cli INFO replication[0m
+[33m[stage-17] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n"[0m
+[33m[stage-17] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:9c5dddb64daca5c0a600308f4e3d66d424043344\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"[0m
+[33m[stage-17] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:9c5dddb64daca5c0a600308f4e3d66d424043344\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"[0m
+[33m[stage-17] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:9c5dddb64daca5c0a600308f4e3d66d424043344\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"[0m
+[33m[stage-17] [0m[92mFound master_replid:xxx in response.[0m
+[33m[stage-17] [0m[92mFound master_reploffset:0 in response.[0m
+[33m[stage-17] [0m[92mTest passed.[0m
+[33m[stage-17] [0m[36mTerminating program[0m
+[33m[stage-17] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-16] [0m[94mRunning tests for Stage #16: hc6[0m
+[33m[stage-16] [0m[94mMaster is running on port 6379[0m
+[33m[stage-16] [0m[94m$ ./spawn_redis_server.sh --port 6380 --replicaof "localhost 6379"[0m
+[33m[stage-16] [0m[36mmaster: Received bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received RESP array: ["PING"][0m
+[33m[stage-16] [0m[94mmaster: Sent "PONG"[0m
+[33m[stage-16] [0m[36mmaster: Sent bytes: "+PONG\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received RESP array: ["REPLCONF", "listening-port", "6380"][0m
+[33m[stage-16] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-16] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received RESP array: ["REPLCONF", "capa", "eof", "capa", "psync2"][0m
+[33m[stage-16] [0m[94mmaster: Sent "OK"[0m
+[33m[stage-16] [0m[36mmaster: Sent bytes: "+OK\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Received RESP array: ["PSYNC", "?", "-1"][0m
+[33m[stage-16] [0m[94mmaster: Sent "FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0"[0m
+[33m[stage-16] [0m[36mmaster: Sent bytes: "+FULLRESYNC 75cd7bc10c49047e0d163660f3b90625b1af31dc 0\r\n"[0m
+[33m[stage-16] [0m[36mmaster: Sent bytes: "$88\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2m\b\xbce\xfa\bused-mem°\xc4\x10\x00\xfa\baof-base\xc0\x00\xff\xf0n;\xfe\xc0\xffZ\xa2"[0m
+[33m[stage-16] [0m[94mclient: $ redis-cli INFO replication[0m
+[33m[stage-16] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n"[0m
+[33m[stage-16] [0m[36mclient: Received bytes: "$613\r\n# Replication\r\nrole:slave\r\nmaster_host:localhost\r\nmaster_port:6379\r\nmaster_link_status:down\r\nmaster_last_io_seconds_ago:-1\r\nmaster_sync_in_progress:0\r\nslave_read_repl_offset:0\r\nslave_repl_offset:0\r\nmaster_link_down_since_seconds:0\r\nslave_priority:100\r\nslave_read_only:1\r\nreplica_announced:1\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:75cd7bc10c49047e0d163660f3b90625b1af31dc\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:1\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:1\r\nrepl_backlog_histlen:0\r\n\r\n"[0m
+[33m[stage-16] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:slave\r\nmaster_host:localhost\r\nmaster_port:6379\r\nmaster_link_status:down\r\nmaster_last_io_seconds_ago:-1\r\nmaster_sync_in_progress:0\r\nslave_read_repl_offset:0\r\nslave_repl_offset:0\r\nmaster_link_down_since_seconds:0\r\nslave_priority:100\r\nslave_read_only:1\r\nreplica_announced:1\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:75cd7bc10c49047e0d163660f3b90625b1af31dc\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:1\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:1\r\nrepl_backlog_histlen:0\r\n"[0m
+[33m[stage-16] [0m[92mReceived "# Replication\r\nrole:slave\r\nmaster_host:localhost\r\nmaster_port:6379\r\nmaster_link_status:down\r\nmaster_last_io_seconds_ago:-1\r\nmaster_sync_in_progress:0\r\nslave_read_repl_offset:0\r\nslave_repl_offset:0\r\nmaster_link_down_since_seconds:0\r\nslave_priority:100\r\nslave_read_only:1\r\nreplica_announced:1\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:75cd7bc10c49047e0d163660f3b90625b1af31dc\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:1\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:1\r\nrepl_backlog_histlen:0\r\n"[0m
+[33m[stage-16] [0m[92mFound role:slave in response.[0m
+[33m[stage-16] [0m[92mTest passed.[0m
+[33m[stage-16] [0m[36mTerminating program[0m
+[33m[stage-16] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-15] [0m[94mRunning tests for Stage #15: ye5[0m
+[33m[stage-15] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-15] [0m[94mclient: $ redis-cli INFO replication[0m
+[33m[stage-15] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n"[0m
+[33m[stage-15] [0m[36mclient: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e6651c8a5c2e8dd0a7ad1b4ac62ffcc84fb639fb\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"[0m
+[33m[stage-15] [0m[36mclient: Received RESP bulk string: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e6651c8a5c2e8dd0a7ad1b4ac62ffcc84fb639fb\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"[0m
+[33m[stage-15] [0m[92mReceived "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e6651c8a5c2e8dd0a7ad1b4ac62ffcc84fb639fb\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"[0m
+[33m[stage-15] [0m[92mFound role:master in response.[0m
+[33m[stage-15] [0m[92mTest passed.[0m
+[33m[stage-15] [0m[36mTerminating program[0m
+[33m[stage-15] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-14] [0m[94mRunning tests for Stage #14: bw1[0m
+[33m[stage-14] [0m[94m$ ./spawn_redis_server.sh --port 6380[0m
+[33m[stage-14] [0m[94mConnecting to port 6380...[0m
+[33m[stage-14] [0m[36mConnection successful[0m
+[33m[stage-14] [0m[92mTest passed.[0m
+[33m[stage-14] [0m[36mTerminating program[0m
+[33m[stage-14] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-13] [0m[94mRunning tests for Stage #13: sm4[0m
+[33m[stage-13] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles202461335 --dbfilename apple.rdb[0m
+[33m[stage-13] [0m[94mclient: $ redis-cli GET strawberry[0m
+[33m[stage-13] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$10\r\nstrawberry\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received bytes: "$-1\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received RESP null bulk string: "$-1\r\n"[0m
+[33m[stage-13] [0m[92mReceived "$-1\r\n"[0m
+[33m[stage-13] [0m[94mclient: > GET orange[0m
+[33m[stage-13] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$6\r\norange\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received bytes: "$9\r\nblueberry\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received RESP bulk string: "blueberry"[0m
+[33m[stage-13] [0m[92mReceived "blueberry"[0m
+[33m[stage-13] [0m[94mclient: > GET apple[0m
+[33m[stage-13] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received bytes: "$6\r\norange\r\n"[0m
+[33m[stage-13] [0m[36mclient: Received RESP bulk string: "orange"[0m
+[33m[stage-13] [0m[92mReceived "orange"[0m
+[33m[stage-13] [0m[92mTest passed.[0m
+[33m[stage-13] [0m[36mTerminating program[0m
+[33m[stage-13] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-12] [0m[94mRunning tests for Stage #12: dq3[0m
+[33m[stage-12] [0m[94mCreated RDB file with key-value pairs: "apple"="pineapple", "raspberry"="strawberry", "mango"="apple", "strawberry"="grape"[0m
+[33m[stage-12] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2321023724 --dbfilename grape.rdb[0m
+[33m[stage-12] [0m[94mclient: $ redis-cli GET apple[0m
+[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received bytes: "$9\r\npineapple\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received RESP bulk string: "pineapple"[0m
+[33m[stage-12] [0m[92mReceived "pineapple"[0m
+[33m[stage-12] [0m[94mclient: > GET raspberry[0m
+[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\nraspberry\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received bytes: "$10\r\nstrawberry\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received RESP bulk string: "strawberry"[0m
+[33m[stage-12] [0m[92mReceived "strawberry"[0m
+[33m[stage-12] [0m[94mclient: > GET mango[0m
+[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$5\r\nmango\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received bytes: "$5\r\napple\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received RESP bulk string: "apple"[0m
+[33m[stage-12] [0m[92mReceived "apple"[0m
+[33m[stage-12] [0m[94mclient: > GET strawberry[0m
+[33m[stage-12] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$10\r\nstrawberry\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received bytes: "$5\r\ngrape\r\n"[0m
+[33m[stage-12] [0m[36mclient: Received RESP bulk string: "grape"[0m
+[33m[stage-12] [0m[92mReceived "grape"[0m
+[33m[stage-12] [0m[92mTest passed.[0m
+[33m[stage-12] [0m[36mTerminating program[0m
+[33m[stage-12] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-11] [0m[94mRunning tests for Stage #11: jw4[0m
+[33m[stage-11] [0m[94mCreated RDB file with 3 keys: ["orange" "banana" "pear"][0m
+[33m[stage-11] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles2091869705 --dbfilename grape.rdb[0m
+[33m[stage-11] [0m[94mclient: $ redis-cli KEYS *[0m
+[33m[stage-11] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
+[33m[stage-11] [0m[36mclient: Received bytes: "*3\r\n$4\r\npear\r\n$6\r\nbanana\r\n$6\r\norange\r\n"[0m
+[33m[stage-11] [0m[36mclient: Received RESP array: ["pear", "banana", "orange"][0m
+[33m[stage-11] [0m[92mReceived ["pear", "banana", "orange"][0m
+[33m[stage-11] [0m[92mTest passed.[0m
+[33m[stage-11] [0m[36mTerminating program[0m
+[33m[stage-11] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-10] [0m[94mRunning tests for Stage #10: gc6[0m
+[33m[stage-10] [0m[94mCreated RDB file with single key-value pair: pineapple="blueberry"[0m
+[33m[stage-10] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles1208672642 --dbfilename mango.rdb[0m
+[33m[stage-10] [0m[94mclient: $ redis-cli GET pineapple[0m
+[33m[stage-10] [0m[36mclient: Sent bytes: "*2\r\n$3\r\nGET\r\n$9\r\npineapple\r\n"[0m
+[33m[stage-10] [0m[36mclient: Received bytes: "$9\r\nblueberry\r\n"[0m
+[33m[stage-10] [0m[36mclient: Received RESP bulk string: "blueberry"[0m
+[33m[stage-10] [0m[92mReceived "blueberry"[0m
+[33m[stage-10] [0m[92mTest passed.[0m
+[33m[stage-10] [0m[36mTerminating program[0m
+[33m[stage-10] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-9] [0m[94mRunning tests for Stage #9: jz6[0m
+[33m[stage-9] [0m[94mCreated RDB file with single key: "apple"[0m
+[33m[stage-9] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles73015925 --dbfilename mango.rdb[0m
+[33m[stage-9] [0m[94mclient: $ redis-cli KEYS *[0m
+[33m[stage-9] [0m[36mclient: Sent bytes: "*2\r\n$4\r\nKEYS\r\n$1\r\n*\r\n"[0m
+[33m[stage-9] [0m[36mclient: Received bytes: "*1\r\n$5\r\napple\r\n"[0m
+[33m[stage-9] [0m[36mclient: Received RESP array: ["apple"][0m
+[33m[stage-9] [0m[92mReceived ["apple"][0m
+[33m[stage-9] [0m[92mTest passed.[0m
+[33m[stage-9] [0m[36mTerminating program[0m
+[33m[stage-9] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-8] [0m[94mRunning tests for Stage #8: zg5[0m
+[33m[stage-8] [0m[94m$ ./spawn_redis_server.sh --dir /private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3503538548 --dbfilename blueberry.rdb[0m
+[33m[stage-8] [0m[94mclient: $ redis-cli CONFIG GET dir[0m
+[33m[stage-8] [0m[36mclient: Sent bytes: "*3\r\n$6\r\nCONFIG\r\n$3\r\nGET\r\n$3\r\ndir\r\n"[0m
+[33m[stage-8] [0m[36mclient: Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3503538548\r\n"[0m
+[33m[stage-8] [0m[36mclient: Received RESP array: ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3503538548"][0m
+[33m[stage-8] [0m[92mReceived ["dir", "/private/var/folders/5l/z5y3dkwn68sgb6htzc5w7vnm0000gn/T/rdbfiles3503538548"][0m
+[33m[stage-8] [0m[92mTest passed.[0m
+[33m[stage-8] [0m[36mTerminating program[0m
+[33m[stage-8] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-7] [0m[94mRunning tests for Stage #7: yz1[0m
+[33m[stage-7] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-7] [0m[94m$ redis-cli SET apple banana px 100[0m
+[33m[stage-7] [0m[36mSent bytes: "*5\r\n$3\r\nSET\r\n$5\r\napple\r\n$6\r\nbanana\r\n$2\r\npx\r\n$3\r\n100\r\n"[0m
+[33m[stage-7] [0m[36mReceived bytes: "+OK\r\n"[0m
+[33m[stage-7] [0m[36mReceived RESP simple string: "OK"[0m
+[33m[stage-7] [0m[92mReceived "OK"[0m
+[33m[stage-7] [0m[92mReceived OK at 22:20:21.189[0m
+[33m[stage-7] [0m[94mFetching key "apple" at 22:20:21.189 (should not be expired)[0m
+[33m[stage-7] [0m[94m> GET apple[0m
+[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
+[33m[stage-7] [0m[36mReceived bytes: "$6\r\nbanana\r\n"[0m
+[33m[stage-7] [0m[36mReceived RESP bulk string: "banana"[0m
+[33m[stage-7] [0m[92mReceived "banana"[0m
+[33m[stage-7] [0m[36mSleeping for 101ms[0m
+[33m[stage-7] [0m[94mFetching key "apple" at 22:20:21.295 (should be expired)[0m
+[33m[stage-7] [0m[94m> GET apple[0m
+[33m[stage-7] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$5\r\napple\r\n"[0m
+[33m[stage-7] [0m[36mReceived bytes: "$-1\r\n"[0m
+[33m[stage-7] [0m[36mReceived RESP null bulk string: "$-1\r\n"[0m
+[33m[stage-7] [0m[92mReceived "$-1\r\n"[0m
+[33m[stage-7] [0m[92mTest passed.[0m
+[33m[stage-7] [0m[36mTerminating program[0m
+[33m[stage-7] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-6] [0m[94mRunning tests for Stage #6: la7[0m
+[33m[stage-6] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-6] [0m[36mSetting key banana to pear[0m
+[33m[stage-6] [0m[94m$ redis-cli SET banana pear[0m
+[33m[stage-6] [0m[36mSent bytes: "*3\r\n$3\r\nSET\r\n$6\r\nbanana\r\n$4\r\npear\r\n"[0m
+[33m[stage-6] [0m[36mReceived bytes: "+OK\r\n"[0m
+[33m[stage-6] [0m[36mReceived RESP simple string: "OK"[0m
+[33m[stage-6] [0m[92mReceived "OK"[0m
+[33m[stage-6] [0m[36mGetting key banana[0m
+[33m[stage-6] [0m[94m> GET banana[0m
+[33m[stage-6] [0m[36mSent bytes: "*2\r\n$3\r\nGET\r\n$6\r\nbanana\r\n"[0m
+[33m[stage-6] [0m[36mReceived bytes: "$4\r\npear\r\n"[0m
+[33m[stage-6] [0m[36mReceived RESP bulk string: "pear"[0m
+[33m[stage-6] [0m[92mReceived "pear"[0m
+[33m[stage-6] [0m[92mTest passed.[0m
+[33m[stage-6] [0m[36mTerminating program[0m
+[33m[stage-6] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-5] [0m[94mRunning tests for Stage #5: qq0[0m
+[33m[stage-5] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-5] [0m[94m$ redis-cli ECHO pear[0m
+[33m[stage-5] [0m[36mSent bytes: "*2\r\n$4\r\nECHO\r\n$4\r\npear\r\n"[0m
+[33m[stage-5] [0m[36mReceived bytes: "$4\r\npear\r\n"[0m
+[33m[stage-5] [0m[36mReceived RESP bulk string: "pear"[0m
+[33m[stage-5] [0m[92mReceived "pear"[0m
+[33m[stage-5] [0m[92mTest passed.[0m
+[33m[stage-5] [0m[36mTerminating program[0m
+[33m[stage-5] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-4] [0m[94mRunning tests for Stage #4: zu2[0m
+[33m[stage-4] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-4] [0m[94mclient-1: $ redis-cli PING[0m
+[33m[stage-4] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[94mclient-2: $ redis-cli PING[0m
+[33m[stage-4] [0m[36mclient-2: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-2: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-2: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[94mclient-1: > PING[0m
+[33m[stage-4] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[94mclient-1: > PING[0m
+[33m[stage-4] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[94mclient-2: > PING[0m
+[33m[stage-4] [0m[36mclient-2: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-2: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-2: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[36mclient-1: Success, closing connection...[0m
+[33m[stage-4] [0m[94mclient-3: $ redis-cli PING[0m
+[33m[stage-4] [0m[36mclient-3: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-4] [0m[36mclient-3: Received bytes: "+PONG\r\n"[0m
+[33m[stage-4] [0m[36mclient-3: Received RESP simple string: "PONG"[0m
+[33m[stage-4] [0m[92mReceived "PONG"[0m
+[33m[stage-4] [0m[36mclient-2: Success, closing connection...[0m
+[33m[stage-4] [0m[36mclient-3: Success, closing connection...[0m
+[33m[stage-4] [0m[92mTest passed.[0m
+[33m[stage-4] [0m[36mTerminating program[0m
+[33m[stage-4] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-3] [0m[94mRunning tests for Stage #3: wy1[0m
+[33m[stage-3] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-3] [0m[94mclient-1: $ redis-cli PING[0m
+[33m[stage-3] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-3] [0m[92mReceived "PONG"[0m
+[33m[stage-3] [0m[94mclient-1: > PING[0m
+[33m[stage-3] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-3] [0m[92mReceived "PONG"[0m
+[33m[stage-3] [0m[94mclient-1: > PING[0m
+[33m[stage-3] [0m[36mclient-1: Sent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received bytes: "+PONG\r\n"[0m
+[33m[stage-3] [0m[36mclient-1: Received RESP simple string: "PONG"[0m
+[33m[stage-3] [0m[92mReceived "PONG"[0m
+[33m[stage-3] [0m[36mSuccess, closing connection...[0m
+[33m[stage-3] [0m[92mTest passed.[0m
+[33m[stage-3] [0m[36mTerminating program[0m
+[33m[stage-3] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-2] [0m[94mRunning tests for Stage #2: rg2[0m
+[33m[stage-2] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-2] [0m[36mConnection established, sending ping command...[0m
+[33m[stage-2] [0m[94m$ redis-cli PING[0m
+[33m[stage-2] [0m[36mSent bytes: "*1\r\n$4\r\nPING\r\n"[0m
+[33m[stage-2] [0m[36mReceived bytes: "+PONG\r\n"[0m
+[33m[stage-2] [0m[36mReceived RESP simple string: "PONG"[0m
+[33m[stage-2] [0m[92mReceived "PONG"[0m
+[33m[stage-2] [0m[92mTest passed.[0m
+[33m[stage-2] [0m[36mTerminating program[0m
+[33m[stage-2] [0m[36mProgram terminated successfully[0m
+
+[33m[stage-1] [0m[94mRunning tests for Stage #1: jm1[0m
+[33m[stage-1] [0m[94m$ ./spawn_redis_server.sh[0m
+[33m[stage-1] [0m[94mConnecting to port 6379...[0m
+[33m[stage-1] [0m[36mConnection successful[0m
+[33m[stage-1] [0m[92mTest passed.[0m
+[33m[stage-1] [0m[36mTerminating program[0m
+[33m[stage-1] [0m[36mProgram terminated successfully[0m
diff --git a/internal/test_txn_discard.go b/internal/test_txn_discard.go
new file mode 100644
index 00000000..eb8b6562
--- /dev/null
+++ b/internal/test_txn_discard.go
@@ -0,0 +1,75 @@
+package internal
+
+import (
+ "fmt"
+
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxDiscard(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ uniqueKeys := random.RandomWords(2)
+ key1, key2 := uniqueKeys[0], uniqueKeys[1]
+ randomInt1, randomInt2 := random.RandomInt(1, 100), random.RandomInt(1, 100)
+
+ commandTestCase := test_cases.SendCommandTestCase{
+ Command: "SET",
+ Args: []string{key2, fmt.Sprint(randomInt2)},
+ Assertion: resp_assertions.NewStringAssertion("OK"),
+ }
+
+ if err := commandTestCase.Run(client, logger); err != nil {
+ return err
+ }
+
+ transactionTestCase := test_cases.TransactionTestCase{
+ CommandQueue: [][]string{
+ {"SET", key1, fmt.Sprint(randomInt1)},
+ {"INCR", key1},
+ },
+ }
+
+ if err := transactionTestCase.RunWithoutExec(client, logger); err != nil {
+ return err
+ }
+
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"DISCARD"},
+ {"GET", key1},
+ {"GET", key2},
+ {"DISCARD"},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion("OK"),
+ resp_assertions.NewNilAssertion(),
+ resp_assertions.NewStringAssertion(fmt.Sprint(randomInt2)),
+ resp_assertions.NewErrorAssertion("ERR DISCARD without MULTI"),
+ },
+ }
+
+ if err := multiCommandTestCase.RunAll(client, logger); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/internal/test_txn_empty.go b/internal/test_txn_empty.go
new file mode 100644
index 00000000..835d1b58
--- /dev/null
+++ b/internal/test_txn_empty.go
@@ -0,0 +1,40 @@
+package internal
+
+import (
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxEmpty(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ emptyTransactionTestCase := test_cases.TransactionTestCase{}
+
+ if err := emptyTransactionTestCase.RunAll(client, logger); err != nil {
+ return err
+ }
+
+ bareExecCommandTestCase := test_cases.SendCommandTestCase{
+ Command: "EXEC",
+ Args: []string{},
+ Assertion: resp_assertions.NewErrorAssertion("ERR EXEC without MULTI"),
+ }
+
+ return bareExecCommandTestCase.Run(client, logger)
+}
diff --git a/internal/test_txn_exec.go b/internal/test_txn_exec.go
new file mode 100644
index 00000000..d7b0044e
--- /dev/null
+++ b/internal/test_txn_exec.go
@@ -0,0 +1,34 @@
+package internal
+
+import (
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxExec(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ bareExecCommandTestCase := test_cases.SendCommandTestCase{
+ Command: "EXEC",
+ Args: []string{},
+ Assertion: resp_assertions.NewErrorAssertion("ERR EXEC without MULTI"),
+ }
+
+ return bareExecCommandTestCase.Run(client, logger)
+}
diff --git a/internal/test_txn_incr1.go b/internal/test_txn_incr1.go
new file mode 100644
index 00000000..996a3723
--- /dev/null
+++ b/internal/test_txn_incr1.go
@@ -0,0 +1,45 @@
+package internal
+
+import (
+ "fmt"
+
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxIncr1(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ randomValue := random.RandomInt(1, 100)
+ randomKey := random.RandomWord()
+
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"SET", randomKey, fmt.Sprint(randomValue)},
+ {"INCR", randomKey},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion("OK"),
+ resp_assertions.NewIntegerAssertion(randomValue + 1),
+ },
+ }
+
+ return multiCommandTestCase.RunAll(client, logger)
+}
diff --git a/internal/test_txn_incr2.go b/internal/test_txn_incr2.go
new file mode 100644
index 00000000..addaaef6
--- /dev/null
+++ b/internal/test_txn_incr2.go
@@ -0,0 +1,44 @@
+package internal
+
+import (
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxIncr2(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ randomKey := random.RandomWord()
+
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"INCR", randomKey},
+ {"INCR", randomKey},
+ {"GET", randomKey},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewIntegerAssertion(1),
+ resp_assertions.NewIntegerAssertion(2),
+ resp_assertions.NewStringAssertion("2"),
+ },
+ }
+
+ return multiCommandTestCase.RunAll(client, logger)
+}
diff --git a/internal/test_txn_incr3.go b/internal/test_txn_incr3.go
new file mode 100644
index 00000000..475c38a5
--- /dev/null
+++ b/internal/test_txn_incr3.go
@@ -0,0 +1,43 @@
+package internal
+
+import (
+ "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/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxIncr3(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ uniqueKeys := random.RandomWords(2)
+ randomKey, randomValue := uniqueKeys[0], uniqueKeys[1]
+
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"SET", randomKey, randomValue},
+ {"INCR", randomKey},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion("OK"),
+ resp_assertions.NewErrorAssertion("ERR value is not an integer or out of range"),
+ },
+ }
+
+ return multiCommandTestCase.RunAll(client, logger)
+}
diff --git a/internal/test_txn_multi.go b/internal/test_txn_multi.go
new file mode 100644
index 00000000..b38311b8
--- /dev/null
+++ b/internal/test_txn_multi.go
@@ -0,0 +1,29 @@
+package internal
+
+import (
+ "github.com/codecrafters-io/redis-tester/internal/redis_executable"
+
+ "github.com/codecrafters-io/redis-tester/internal/instrumented_resp_connection"
+ "github.com/codecrafters-io/redis-tester/internal/test_cases"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxMulti(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, "localhost:6379", "client")
+ if err != nil {
+ logFriendlyError(logger, err)
+ return err
+ }
+ defer client.Close()
+
+ transactionTestCase := test_cases.TransactionTestCase{}
+
+ return transactionTestCase.RunMulti(client, logger)
+}
diff --git a/internal/test_txn_multi_tx.go b/internal/test_txn_multi_tx.go
new file mode 100644
index 00000000..b05b28eb
--- /dev/null
+++ b/internal/test_txn_multi_tx.go
@@ -0,0 +1,78 @@
+package internal
+
+import (
+ "fmt"
+
+ "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"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxMultiTx(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ clients, err := SpawnClients(3, "localhost:6379", stageHarness, logger)
+ if err != nil {
+ return err
+ }
+ for _, client := range clients {
+ defer client.Close()
+ }
+
+ uniqueKeys := random.RandomWords(2)
+ key1, key2 := uniqueKeys[0], uniqueKeys[1]
+ randomIntegerValue := random.RandomInt(1, 100)
+
+ for i, client := range clients {
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"SET", key2, fmt.Sprint(randomIntegerValue)},
+ {"INCR", key1},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion("OK"),
+ resp_assertions.NewIntegerAssertion(i + 1),
+ },
+ }
+
+ if err := multiCommandTestCase.RunAll(client, logger); err != nil {
+ return err
+ }
+ }
+
+ for _, client := range clients {
+ transactionTestCase := test_cases.TransactionTestCase{
+ CommandQueue: [][]string{
+ {"INCR", key1},
+ {"INCR", key2},
+ },
+ }
+ if err := transactionTestCase.RunWithoutExec(client, logger); err != nil {
+ return err
+ }
+ }
+
+ for i, client := range clients {
+ transactionTestCase := test_cases.TransactionTestCase{
+ // Before a single transaction is queued,
+ // We run 3x INCR key1, and set key2 to randomIntegerValue
+ // Inside each transaction, we run 1x INCR key1, key2
+ // So it increases by 1 for each transaction
+ // `i` here is 0-indexed, so we add 1 to the expected value
+ ExpectedResponseArray: []resp_assertions.RESPAssertion{resp_assertions.NewIntegerAssertion(3 + (1 + i)), resp_assertions.NewIntegerAssertion(randomIntegerValue + (1 + i))},
+ }
+ if err := transactionTestCase.RunExec(client, logger); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/internal/test_txn_queue.go b/internal/test_txn_queue.go
new file mode 100644
index 00000000..60f46b68
--- /dev/null
+++ b/internal/test_txn_queue.go
@@ -0,0 +1,51 @@
+package internal
+
+import (
+ "fmt"
+
+ "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"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxQueue(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ clients, err := SpawnClients(2, "localhost:6379", stageHarness, logger)
+ if err != nil {
+ return err
+ }
+ for _, client := range clients {
+ defer client.Close()
+ }
+
+ key := random.RandomWord()
+ randomIntegerValue := random.RandomInt(1, 100)
+
+ transactionTestCase := test_cases.TransactionTestCase{
+ CommandQueue: [][]string{
+ {"SET", key, fmt.Sprint(randomIntegerValue)},
+ {"INCR", key},
+ },
+ }
+
+ if err := transactionTestCase.RunWithoutExec(clients[0], logger); err != nil {
+ return err
+ }
+
+ commandTestCase := test_cases.SendCommandTestCase{
+ Command: "GET",
+ Args: []string{key},
+ Assertion: resp_assertions.NewNilAssertion(),
+ }
+
+ return commandTestCase.Run(clients[1], logger)
+}
diff --git a/internal/test_txn_tx.go b/internal/test_txn_tx.go
new file mode 100644
index 00000000..38995dbd
--- /dev/null
+++ b/internal/test_txn_tx.go
@@ -0,0 +1,55 @@
+package internal
+
+import (
+ "fmt"
+
+ "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"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxSuccess(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ clients, err := SpawnClients(2, "localhost:6379", stageHarness, logger)
+ if err != nil {
+ return err
+ }
+ for _, client := range clients {
+ defer client.Close()
+ }
+
+ uniqueKeys := random.RandomWords(2)
+ key1, key2 := uniqueKeys[0], uniqueKeys[1]
+ randomIntegerValue := random.RandomInt(1, 100)
+
+ transactionTestCase := test_cases.TransactionTestCase{
+ CommandQueue: [][]string{
+ {"SET", key1, fmt.Sprint(randomIntegerValue)},
+ {"INCR", key1},
+ {"INCR", key2},
+ {"GET", key2},
+ },
+ ExpectedResponseArray: []resp_assertions.RESPAssertion{resp_assertions.NewStringAssertion("OK"), resp_assertions.NewIntegerAssertion(randomIntegerValue + 1), resp_assertions.NewIntegerAssertion(1), resp_assertions.NewStringAssertion("1")},
+ }
+
+ if err := transactionTestCase.RunAll(clients[0], logger); err != nil {
+ return err
+ }
+
+ commandTestCase := test_cases.SendCommandTestCase{
+ Command: "GET",
+ Args: []string{key1},
+ Assertion: resp_assertions.NewStringAssertion(fmt.Sprint(randomIntegerValue + 1)),
+ }
+
+ return commandTestCase.Run(clients[1], logger)
+}
diff --git a/internal/test_txn_tx_failure.go b/internal/test_txn_tx_failure.go
new file mode 100644
index 00000000..27a8c3aa
--- /dev/null
+++ b/internal/test_txn_tx_failure.go
@@ -0,0 +1,77 @@
+package internal
+
+import (
+ "fmt"
+
+ "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"
+ "github.com/codecrafters-io/tester-utils/random"
+ "github.com/codecrafters-io/tester-utils/test_case_harness"
+)
+
+func testTxErr(stageHarness *test_case_harness.TestCaseHarness) error {
+ b := redis_executable.NewRedisExecutable(stageHarness)
+ if err := b.Run(); err != nil {
+ return err
+ }
+
+ logger := stageHarness.Logger
+
+ clients, err := SpawnClients(2, "localhost:6379", stageHarness, logger)
+ if err != nil {
+ return err
+ }
+ for _, client := range clients {
+ defer client.Close()
+ }
+
+ uniqueKeys := random.RandomWords(3)
+ key1, key2 := uniqueKeys[0], uniqueKeys[1]
+ randomStringValue := uniqueKeys[2]
+ randomIntegerValue := random.RandomInt(1, 100)
+
+ multiCommandTestCase := test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"SET", key1, randomStringValue},
+ {"SET", key2, fmt.Sprint(randomIntegerValue)},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion("OK"),
+ resp_assertions.NewStringAssertion("OK"),
+ },
+ }
+
+ if err := multiCommandTestCase.RunAll(clients[0], logger); err != nil {
+ return err
+ }
+
+ transactionTestCase := test_cases.TransactionTestCase{
+ CommandQueue: [][]string{
+ {"INCR", key1},
+ {"INCR", key2},
+ },
+ ExpectedResponseArray: []resp_assertions.RESPAssertion{
+ resp_assertions.NewErrorAssertion("ERR value is not an integer or out of range"),
+ resp_assertions.NewIntegerAssertion(randomIntegerValue + 1),
+ },
+ }
+
+ if err := transactionTestCase.RunAll(clients[0], logger); err != nil {
+ return err
+ }
+
+ multiCommandTestCase = test_cases.MultiCommandTestCase{
+ Commands: [][]string{
+ {"GET", key2},
+ {"GET", key1},
+ },
+ Assertions: []resp_assertions.RESPAssertion{
+ resp_assertions.NewStringAssertion(fmt.Sprint(randomIntegerValue + 1)),
+ resp_assertions.NewStringAssertion(randomStringValue),
+ },
+ }
+
+ return multiCommandTestCase.RunAll(clients[1], logger)
+}
diff --git a/internal/tester_definition.go b/internal/tester_definition.go
index f7a470b9..0d3de6c3 100644
--- a/internal/tester_definition.go
+++ b/internal/tester_definition.go
@@ -192,5 +192,49 @@ var testerDefinition = tester_definition.TesterDefinition{
Slug: "xu1",
TestFunc: testStreamsXreadBlockMaxID,
},
+ {
+ Slug: "si4",
+ TestFunc: testTxIncr1,
+ },
+ {
+ Slug: "lz8",
+ TestFunc: testTxIncr2,
+ },
+ {
+ Slug: "mk1",
+ TestFunc: testTxIncr3,
+ },
+ {
+ Slug: "pn0",
+ TestFunc: testTxMulti,
+ },
+ {
+ Slug: "lo4",
+ TestFunc: testTxExec,
+ },
+ {
+ Slug: "we1",
+ TestFunc: testTxEmpty,
+ },
+ {
+ Slug: "rs9",
+ TestFunc: testTxQueue,
+ },
+ {
+ Slug: "fy6",
+ TestFunc: testTxSuccess,
+ },
+ {
+ Slug: "rl9",
+ TestFunc: testTxDiscard,
+ },
+ {
+ Slug: "sg9",
+ TestFunc: testTxErr,
+ },
+ {
+ Slug: "jf8",
+ TestFunc: testTxMultiTx,
+ },
},
}
diff --git a/internal/util.go b/internal/util.go
index edb28340..e12e55d0 100644
--- a/internal/util.go
+++ b/internal/util.go
@@ -55,3 +55,20 @@ func SpawnReplicas(replicaCount int, stageHarness *test_case_harness.TestCaseHar
}
return replicas, nil
}
+
+// SpawnClients creates `clientCount` clients connected to the given address.
+// The clients are created using the `instrumented_resp_connection.NewFromAddr` function.
+// Clients are supposed to be closed after use.
+func SpawnClients(clientCount int, addr string, stageHarness *test_case_harness.TestCaseHarness, logger *logger.Logger) ([]*resp_connection.RespConnection, error) {
+ var clients []*resp_connection.RespConnection
+
+ for i := 0; i < clientCount; i++ {
+ client, err := instrumented_resp_connection.NewFromAddr(stageHarness, addr, fmt.Sprintf("client-%d", i+1))
+ if err != nil {
+ logFriendlyError(logger, err)
+ return nil, err
+ }
+ clients = append(clients, client)
+ }
+ return clients, nil
+}