Skip to content

Commit

Permalink
Merge pull request #59 from codecrafters-io/redis-repl
Browse files Browse the repository at this point in the history
Return err if our master server couldn't bind to port.
  • Loading branch information
ryan-gang authored Feb 16, 2024
2 parents 1917bfa + 6919562 commit 0a63f0b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/test_repl_info_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func testReplInfoReplica(stageHarness *testerutils.StageHarness) error {
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}
defer listener.Close()
logger := stageHarness.Logger
Expand Down
1 change: 1 addition & 0 deletions internal/test_repl_replica_cmd_processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func testReplCmdProcessing(stageHarness *testerutils.StageHarness) error {
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}

logger := stageHarness.Logger
Expand Down
1 change: 1 addition & 0 deletions internal/test_repl_replica_getack_nonzero.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func testReplGetaAckNonZero(stageHarness *testerutils.StageHarness) error {
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}

logger := stageHarness.Logger
Expand Down
1 change: 1 addition & 0 deletions internal/test_repl_replica_getack_zero.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func testReplGetaAckZero(stageHarness *testerutils.StageHarness) error {
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}

logger := stageHarness.Logger
Expand Down
1 change: 1 addition & 0 deletions internal/test_repl_replica_psync.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func testReplReplicaSendsPsync(stageHarness *testerutils.StageHarness) error {
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}
logger := stageHarness.Logger

Expand Down
1 change: 1 addition & 0 deletions internal/test_repl_replica_replconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func testReplReplicaSendsReplconf(stageHarness *testerutils.StageHarness) error
listener, err := net.Listen("tcp", ":6379")
if err != nil {
fmt.Println("Error starting TCP server:", err)
return err
}
logger := stageHarness.Logger

Expand Down

0 comments on commit 0a63f0b

Please sign in to comment.