Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Zike Yang <[email protected]>
  • Loading branch information
shibd and RobertIndie authored Dec 30, 2024
1 parent 0e90dee commit e585818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pulsar/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5057,11 +5057,11 @@ func TestSelectConnectionForSameConsumer(t *testing.T) {
assert.NoError(t, err)
defer _consumer.Close()

partitionConsumerImp := _consumer.(*consumer).consumers[0]
partitionConsumerImpl := _consumer.(*consumer).consumers[0]

Check failure on line 5060 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / lint

partitionConsumerImpl declared and not used

Check failure on line 5060 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.22)

partitionConsumerImpl declared and not used

Check failure on line 5060 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.23)

declared and not used: partitionConsumerImpl
conn := partitionConsumerImp._getConn()

Check failure on line 5061 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: partitionConsumerImp

Check failure on line 5061 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.22)

undefined: partitionConsumerImp

Check failure on line 5061 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.23)

undefined: partitionConsumerImp

for i := 0; i < 5; i++ {
partitionConsumerImp.grabConn("")
assert.NoError(t, partitionConsumerImp.grabConn(""))

Check failure on line 5064 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: partitionConsumerImp

Check failure on line 5064 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.22)

undefined: partitionConsumerImp

Check failure on line 5064 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.23)

undefined: partitionConsumerImp
assert.Equal(t, conn.ID(), partitionConsumerImp._getConn().ID(),

Check failure on line 5065 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: partitionConsumerImp (typecheck)

Check failure on line 5065 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.22)

undefined: partitionConsumerImp

Check failure on line 5065 in pulsar/consumer_test.go

View workflow job for this annotation

GitHub Actions / integration-tests (1.23)

undefined: partitionConsumerImp
"The consumer uses a different connection when reconnecting")
}
Expand Down
3 changes: 2 additions & 1 deletion pulsar/internal/connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func NewConnectionPool(
func (p *connectionPool) GetConnection(logicalAddr *url.URL, physicalAddr *url.URL,
keySuffix int32) (Connection, error) {
p.log.WithField("logicalAddr", logicalAddr).
WithField("physicalAddr", physicalAddr).Debug("Getting pooled connection")
WithField("physicalAddr", physicalAddr).
WithField("keySuffix", keySuffix).Debug("Getting pooled connection")
key := fmt.Sprint(logicalAddr.Host, "-", physicalAddr.Host, "-", keySuffix)

p.Lock()
Expand Down

0 comments on commit e585818

Please sign in to comment.