Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
torywheelwright committed Apr 1, 2024
1 parent 4627a29 commit af79b01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions integration-tests/fault-injection/redisStopStart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ func TestRedisStopStart(t *testing.T) {
"clientIdx": "0",
})
if nSuccess != 100 {
t.Errorf("Metric otr_redispub_processed_messages(status: sent) = %d, expected 100", nSuccess)
t.Errorf("Metric otr_redispub_processed_messages(status: sent, clientIdx: 0) = %d, expected 100", nSuccess)
}

nPermFail := harness.FindPromMetricCounter(metrics, "otr_redispub_processed_messages", map[string]string{
"status": "failed",
"clientIdx": "0",
})
if nPermFail != 0 {
t.Errorf("Metric otr_redispub_processed_messages(status: failed) = %d, expected 0", nPermFail)
t.Errorf("Metric otr_redispub_processed_messages(status: failed, clientIdx: 0) = %d, expected 0", nPermFail)
}

nTempFail := harness.FindPromMetricCounter(metrics, "otr_redispub_temporary_send_failures", map[string]string{})
Expand Down
8 changes: 4 additions & 4 deletions lib/redispub/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ func PublishStream(clients []redis.UniversalClient, in <-chan *Publication, opts
for i, client := range clients {
clientIdx := i
client := client
inChan := make(chan *Publication)
inChans = append(inChans, inChan)
outChan := make(chan error)
outChans = append(outChans, outChan)

go func() {
inChan := make(chan *Publication)
inChans = append(inChans, inChan)
outChan := make(chan error)
defer close(outChan)
outChans = append(outChans, outChan)

publishFn := func(p *Publication) error {
return publishSingleMessage(p, client, opts.MetadataPrefix, dedupeExpirationSeconds)
Expand Down

0 comments on commit af79b01

Please sign in to comment.