nodece commented on code in PR #1256: URL: https://github.com/apache/pulsar-client-go/pull/1256#discussion_r1698014399
########## pulsar/consumer_test.go: ########## @@ -3691,6 +3691,9 @@ func TestConsumerSeekByTimeOnPartitionedTopic(t *testing.T) { err = consumer.SeekByTime(currentTimestamp.Add(-retentionTimeInSecond)) assert.Nil(t, err) + // Seek command disconnects the consumer, so we need to wait for reconnection. + <-time.After(5 * time.Second) Review Comment: CI will fail. There are races: ``` 2024-07-31T04:53:49.4735743Z time="2024-07-31T04:36:16Z" level=info msg="Reconnected consumer to broker" consumerID=5 name=itqer subscription=my-sub topic="persistent://public/default/TestSeekByTimeOnPartitionedTopic-partition-3" 2024-07-31T04:53:49.4736472Z time="2024-07-31T04:40:19Z" level=warning msg="Failed to write on connection" error="write tcp 127.0.0.1:57350->127.0.0.1:6650: use of closed network connection" local_addr="127.0.0.1:57350" remote_addr="pulsar://localhost:6650" 2024-07-31T04:53:49.4737067Z time="2024-07-31T04:40:26Z" level=warning msg="Failed to write on connection" error="write tcp 127.0.0.1:52750->127.0.0.1:6650: use of closed network connection" local_addr="127.0.0.1:52750" remote_addr="pulsar://localhost:6650" 2024-07-31T04:53:49.4737665Z time="2024-07-31T04:40:26Z" level=warning msg="Failed to write on connection" error="write tcp 127.0.0.1:52750->127.0.0.1:6650: use of closed network connection" local_addr="127.0.0.1:52750" remote_addr="pulsar://localhost:6650" ``` Because the reconnect and ack requests of the consumer in the different goroutine. In the past, I guess that CI is passed because of sleep. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org