Skip to content

Commit

Permalink
Merge pull request #889 from cloudevents/testRaceFix
Browse files Browse the repository at this point in the history
Trying to fix a race warning
  • Loading branch information
duglin authored Apr 11, 2023
2 parents 17706ee + 75e612b commit 4fb49a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocol/kafka_sarama/v2/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func (s *syncProducerMock) AbortTxn() error {
}

func (s *syncProducerMock) TxnStatus() sarama.ProducerTxnStatusFlag {
s.lock.Lock()
defer s.lock.Unlock()
return s.status
}

Expand Down

0 comments on commit 4fb49a3

Please sign in to comment.