Skip to content

Commit 4fb49a3

Browse files
authored
Merge pull request #889 from cloudevents/testRaceFix
Trying to fix a race warning
2 parents 17706ee + 75e612b commit 4fb49a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

protocol/kafka_sarama/v2/sender_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ func (s *syncProducerMock) AbortTxn() error {
7474
}
7575

7676
func (s *syncProducerMock) TxnStatus() sarama.ProducerTxnStatusFlag {
77+
s.lock.Lock()
78+
defer s.lock.Unlock()
7779
return s.status
7880
}
7981

0 commit comments

Comments
 (0)