From 69195621421471df5b5708ef81b9fc0de2db275f Mon Sep 17 00:00:00 2001 From: Ryan Gang Date: Fri, 16 Feb 2024 07:34:00 +0000 Subject: [PATCH] Return err if master couldn't bind. --- internal/test_repl_info_replica.go | 1 + internal/test_repl_replica_cmd_processing.go | 1 + internal/test_repl_replica_getack_nonzero.go | 1 + internal/test_repl_replica_getack_zero.go | 1 + internal/test_repl_replica_psync.go | 1 + internal/test_repl_replica_replconf.go | 1 + 6 files changed, 6 insertions(+) diff --git a/internal/test_repl_info_replica.go b/internal/test_repl_info_replica.go index 2188dff3..dc732033 100644 --- a/internal/test_repl_info_replica.go +++ b/internal/test_repl_info_replica.go @@ -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 diff --git a/internal/test_repl_replica_cmd_processing.go b/internal/test_repl_replica_cmd_processing.go index 0fa74b82..2ae0b7ef 100644 --- a/internal/test_repl_replica_cmd_processing.go +++ b/internal/test_repl_replica_cmd_processing.go @@ -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 diff --git a/internal/test_repl_replica_getack_nonzero.go b/internal/test_repl_replica_getack_nonzero.go index 4923987c..5e4bbc71 100644 --- a/internal/test_repl_replica_getack_nonzero.go +++ b/internal/test_repl_replica_getack_nonzero.go @@ -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 diff --git a/internal/test_repl_replica_getack_zero.go b/internal/test_repl_replica_getack_zero.go index cdcfd698..f60b296a 100644 --- a/internal/test_repl_replica_getack_zero.go +++ b/internal/test_repl_replica_getack_zero.go @@ -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 diff --git a/internal/test_repl_replica_psync.go b/internal/test_repl_replica_psync.go index 410cd08f..a06058d8 100644 --- a/internal/test_repl_replica_psync.go +++ b/internal/test_repl_replica_psync.go @@ -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 diff --git a/internal/test_repl_replica_replconf.go b/internal/test_repl_replica_replconf.go index 2738bff6..0ef406d3 100644 --- a/internal/test_repl_replica_replconf.go +++ b/internal/test_repl_replica_replconf.go @@ -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