Skip to content

Commit

Permalink
fix: add log prefix to pre-handshake logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed May 10, 2024
1 parent 9414dbe commit aff2f6d
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 216 deletions.
10 changes: 5 additions & 5 deletions internal/test_cases/receive_replication_handshake_test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func (t ReceiveReplicationHandshakeTestCase) RunAll(client *resp_connection.Resp
}

func (t ReceiveReplicationHandshakeTestCase) RunPingStep(client *resp_connection.RespConnection, logger *logger.Logger) error {
logger.Debugf("Waiting for replica to initiate Replication handshake.")
logger.Debugf("Waiting for replica to send %q command", "PING")
logger.Debugf("master: Waiting for replica to initiate Replication handshake.")
logger.Debugf("master: Waiting for replica to send %q command", "PING")

commandTest := ReceiveCommandTestCase{
Assertion: resp_assertions.NewCommandAssertion("PING"),
Expand All @@ -56,7 +56,7 @@ func (t ReceiveReplicationHandshakeTestCase) RunPingStep(client *resp_connection
}

func (t ReceiveReplicationHandshakeTestCase) RunReplconfStep1(client *resp_connection.RespConnection, logger *logger.Logger) error {
logger.Debugf("Waiting for replica to send %q command", "REPLCONF listening-port")
logger.Debugf("master: Waiting for replica to send %q command", "REPLCONF listening-port")

commandTest := ReceiveCommandTestCase{
Assertion: resp_assertions.NewCommandAssertion("REPLCONF", "listening-port", "6380"),
Expand All @@ -68,7 +68,7 @@ func (t ReceiveReplicationHandshakeTestCase) RunReplconfStep1(client *resp_conne
}

func (t ReceiveReplicationHandshakeTestCase) RunReplconfStep2(client *resp_connection.RespConnection, logger *logger.Logger) error {
logger.Debugf("Waiting for replica to send %q command", "REPLCONF capa")
logger.Debugf("master: Waiting for replica to send %q command", "REPLCONF capa")

commandTest := ReceiveCommandTestCase{
Assertion: resp_assertions.NewOnlyCommandAssertion("REPLCONF"),
Expand Down Expand Up @@ -114,7 +114,7 @@ func (t ReceiveReplicationHandshakeTestCase) RunReplconfStep2(client *resp_conne
}

func (t ReceiveReplicationHandshakeTestCase) RunPsyncStep(client *resp_connection.RespConnection, logger *logger.Logger) error {
logger.Debugf("Waiting for replica to send %q command", "PSYNC")
logger.Debugf("master: Waiting for replica to send %q command", "PSYNC")

id := "75cd7bc10c49047e0d163660f3b90625b1af31dc"
commandTest := ReceiveCommandTestCase{
Expand Down

0 comments on commit aff2f6d

Please sign in to comment.