Browse Source

Fixing wrong return variable

DiSiqueira 8 years ago
parent
commit
ca53c4bb1c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mocks/sync_producer.go

+ 1 - 1
mocks/sync_producer.go

@@ -55,7 +55,7 @@ func (sp *SyncProducer) SendMessage(msg *sarama.ProducerMessage) (partition int3
 			errCheck := expectation.CheckFunction(val)
 			errCheck := expectation.CheckFunction(val)
 			if errCheck != nil {
 			if errCheck != nil {
 				sp.t.Errorf("Check function returned an error: %s", errCheck.Error())
 				sp.t.Errorf("Check function returned an error: %s", errCheck.Error())
-				return -1, -1, err
+				return -1, -1, errCheck
 			}
 			}
 		}
 		}
 		if expectation.Result == errProduceSuccess {
 		if expectation.Result == errProduceSuccess {