Skip to content

Commit

Permalink
Merge pull request #7 from violetpay-org/testing/mocks
Browse files Browse the repository at this point in the history
Test: MockConsumerGroupSession, MockConsumerGroupClaim, MockAsyncProd…
  • Loading branch information
asheswook authored Jul 4, 2024
2 parents 4e6df80 + 75c8dd0 commit 4894a96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Queue Streamer
![Coverage](https://img.shields.io/badge/Coverage-91.8%25-brightgreen)
![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen)
[![Test](https://github.com/violetpay-org/queue-streamer/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/violetpay-org/queue-streamer/actions/workflows/test.yml)
[![CodeQL](https://github.com/violetpay-org/queue-streamer/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/violetpay-org/queue-streamer/actions/workflows/github-code-scanning/codeql)

Expand Down
2 changes: 2 additions & 0 deletions internal/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,11 @@ func TestMockAsyncProducer_TxnStatus(t *testing.T) {
assert.Zero(t, producer.TxnStatus())

producer.TxnStatusFlag = sarama.ProducerTxnFlagInError
assert.NotZero(t, producer.TxnStatus())
assert.Equal(t, sarama.ProducerTxnFlagInError, producer.TxnStatus())

producer.TxnStatusFlag = sarama.ProducerTxnFlagAbortableError
assert.NotZero(t, producer.TxnStatus())
assert.Equal(t, sarama.ProducerTxnFlagAbortableError, producer.TxnStatus())
})
}
Expand Down

0 comments on commit 4894a96

Please sign in to comment.