BewareMyPower commented on code in PR #1502:
URL: https://github.com/apache/pulsar-client-go/pull/1502#discussion_r3333128436
##########
pulsar/blue_green_migration_test.go:
##########
@@ -159,14 +161,32 @@ func testTopicMigrate(
}
pm := ProducerMessage{Payload:
[]byte(fmt.Sprintf("hello-%d", i))}
+ retryStarted := time.Now()
for true {
- ctx, cancel :=
context.WithTimeout(context.Background(), 1*time.Second)
- defer cancel()
- _, err := producer.Send(ctx, &pm)
+ err := func() error {
+ ctx, cancel :=
context.WithTimeout(context.Background(), 1*time.Second)
+ defer cancel()
+ _, err := producer.Send(ctx, &pm)
+ return err
+ }
Review Comment:
You missed a call to this function, with current code base, `err` is a
function but not an `error`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]