boncheff opened a new issue #72: Data race 
URL: https://github.com/apache/pulsar-client-go/issues/72
 
 
   #### Expected behaviour
   
   Running `go test ./... -race` should not fail
   
   Tell us what should happen
   
   #### Actual behaviour
   
   ```
   There are race conditions when running the tests.
   
   $ go test ./... -race
   ?    github.com/apache/pulsar-client-go/examples/consumer    [no test files]
   ?    github.com/apache/pulsar-client-go/examples/consumer-listener   [no 
test files]
   ?    github.com/apache/pulsar-client-go/examples/producer    [no test files]
   ?    github.com/apache/pulsar-client-go/perf [no test files]
   ?    github.com/apache/pulsar-client-go/pkg/auth     [no test files]
   ok   github.com/apache/pulsar-client-go/pkg/compression      (cached)
   ?    github.com/apache/pulsar-client-go/pkg/pb       [no test files]
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c000154070 by goroutine 9:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000154070 by goroutine 8:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 9 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 8 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c000154010 by goroutine 9:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000154010 by goroutine 8:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 9 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 8 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65393" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4070 by goroutine 17:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4070 by goroutine 15:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:174
 +0xa67
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:127
 +0x5a9
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:104
 +0xab
   
   Goroutine 17 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:174
 +0xa67
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:127
 +0x5a9
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:104
 +0xab
   
   Goroutine 15 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:103
 +0x3b2
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4010 by goroutine 17:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4010 by goroutine 15:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:174
 +0xa67
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:127
 +0x5a9
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:104
 +0xab
   
   Goroutine 17 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:174
 +0xa67
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:127
 +0x5a9
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:104
 +0xab
   
   Goroutine 15 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:103
 +0x3b2
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestProducerConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:50
 +0x25e
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65394" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/my-topic"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created producer" 
name=standalone-0-85 topic="persistent://public/default/my-topic"
   ==================
   WARNING: DATA RACE
   Read at 0x00c0001f0360 by goroutine 22:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).ReceivedSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:365
 +0x13a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).handleSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:412
 +0x19e
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).receivedCommand()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:354
 +0x327
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionReader).readFromConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_reader.go:54
 +0x1de
   
   Previous write at 0x00c0001f0360 by goroutine 26:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlush()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:297
 +0x26e
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:207
 +0x28b
   
   Goroutine 22 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).run()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:256
 +0x82
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:150
 +0x66
   
   Goroutine 26 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:114
 +0xace
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   ==================
   ==================
   WARNING: DATA RACE
   Read at 0x00c0001ec2b0 by goroutine 22:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).ReceivedSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:365
 +0x181
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).handleSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:412
 +0x19e
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).receivedCommand()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:354
 +0x327
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionReader).readFromConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_reader.go:54
 +0x1de
   
   Previous write at 0x00c0001ec2b0 by goroutine 26:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlush()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:297
 +0x22d
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:207
 +0x28b
   
   Goroutine 22 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).run()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:256
 +0x82
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:150
 +0x66
   
   Goroutine 26 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:114
 +0xace
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   ==================
   ==================
   WARNING: DATA RACE
   Read at 0x00c0001da340 by goroutine 22:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).ReceivedSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:367
 +0x1bc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).handleSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:412
 +0x19e
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).receivedCommand()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:354
 +0x327
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionReader).readFromConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_reader.go:54
 +0x1de
   
   Previous write at 0x00c0001da340 by goroutine 26:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlush()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:299
 +0xd5
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:207
 +0x28b
   
   Goroutine 22 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).run()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:256
 +0x82
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:150
 +0x66
   
   Goroutine 26 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:114
 +0xace
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   ==================
   ==================
   WARNING: DATA RACE
   Read at 0x00c0001da348 by goroutine 22:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).ReceivedSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:372
 +0x1e1
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).handleSendReceipt()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:412
 +0x19e
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).receivedCommand()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:354
 +0x327
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionReader).readFromConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_reader.go:54
 +0x1de
   
   Previous write at 0x00c0001da348 by goroutine 26:
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlush()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:299
 +0xd5
     
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:207
 +0x28b
   
   Goroutine 22 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).run()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:256
 +0x82
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:150
 +0x66
   
   Goroutine 26 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:114
 +0xace
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing producer" 
name=standalone-0-85 topic="persistent://public/default/my-topic"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed producer" 
name=standalone-0-85 topic="persistent://public/default/my-topic"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/my-topic"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/my-topic"
   --- FAIL: TestProducerConsumer (0.10s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://invalid-hostname:6650"
   time="2019-10-11T14:29:21+01:00" level=error msg="Error: MetadataError, 
Error Message: Consumer not found" laddr="[::1]:65394" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection closed" 
laddr="[::1]:65394" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Error reading from 
connection" error="Short read when reading frame size" laddr="[::1]:65394" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp: lookup invalid-hostname: no such host" 
raddr="pulsar://invalid-hostname:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection closed" 
raddr="pulsar://invalid-hostname:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4150 by goroutine 32:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4150 by goroutine 31:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 32 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 31 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c40f0 by goroutine 32:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c40f0 by goroutine 31:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 32 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 31 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65395" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4230 by goroutine 39:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4230 by goroutine 38:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:128
 +0x7ac
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:104
 +0x753
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   
   Goroutine 39 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:128
 +0x7ac
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:104
 +0x753
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   
   Goroutine 38 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:81
 +0x35b
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c41d0 by goroutine 39:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c41d0 by goroutine 38:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:128
 +0x7ac
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:104
 +0x753
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   
   Goroutine 39 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).grabCnx()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:128
 +0x7ac
     github.com/apache/pulsar-client-go/pulsar.newPartitionProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_producer.go:104
 +0x753
     github.com/apache/pulsar-client-go/pulsar.newProducer.func2()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:82
 +0x70
   
   Goroutine 38 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:81
 +0x35b
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestBatchMessageReceive()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:144
 +0x28a
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65396" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created producer" 
name=standalone-0-86 topic="persistent://public/default/receive-batch"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/receive-batch"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing producer" 
name=standalone-0-86 topic="persistent://public/default/receive-batch"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed producer" 
name=standalone-0-86 topic="persistent://public/default/receive-batch"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/receive-batch"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/receive-batch"
   --- FAIL: TestBatchMessageReceive (0.41s)
       testing.go:853: race detected during execution of test
   subscription name is required for consumer: Result(29)
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c00039c070 by goroutine 50:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c00039c070 by goroutine 49:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_SubscriptionEarliestPos()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:235
 +0x30b
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 50 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_SubscriptionEarliestPos()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:235
 +0x30b
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 49 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c00039c010 by goroutine 50:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c00039c010 by goroutine 49:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_SubscriptionEarliestPos()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:235
 +0x30b
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 50 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_SubscriptionEarliestPos()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:235
 +0x30b
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 49 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65397" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65398" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created producer" 
name=standalone-0-87 topic="persistent://public/default/testSeek-1570800561"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/testSeek-1570800561"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/testSeek-1570800561"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003646c0 by goroutine 67:
     runtime.mapdelete_fast64()
         /usr/local/Cellar/go/1.13/libexec/src/runtime/map_fast64.go:272 +0x0
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).DeleteConsumeHandler()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:582
 +0xb7
     
github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).internalClose()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:590
 +0x3e0
     
github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).runEventsLoop()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:557
 +0x2fe
   
   Previous read at 0x00c0003646c0 by goroutine 64:
     runtime.mapaccess2_fast64()
         /usr/local/Cellar/go/1.13/libexec/src/runtime/map_fast64.go:52 +0x0
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).handleMessage()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:421
 +0x178
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).receivedCommand()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:359
 +0x449
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionReader).readFromConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_reader.go:54
 +0x1de
   
   Goroutine 67 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_partition_consumer.go:147
 +0x999
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:104
 +0xab
   
   Goroutine 64 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).run()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:256
 +0x82
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:150
 +0x66
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/testSeek-1570800561"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closing producer" 
name=standalone-0-87 topic="persistent://public/default/testSeek-1570800561"
   time="2019-10-11T14:29:21+01:00" level=info msg="Closed producer" 
name=standalone-0-87 topic="persistent://public/default/testSeek-1570800561"
   --- FAIL: TestConsumer_SubscriptionEarliestPos (0.06s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4310 by goroutine 69:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4310 by goroutine 68:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerKeyShared()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:296
 +0x27d
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 69 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerKeyShared()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:296
 +0x27d
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 68 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c42b0 by goroutine 69:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c42b0 by goroutine 68:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerKeyShared()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:296
 +0x27d
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 69 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerKeyShared()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:296
 +0x27d
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 68 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65399" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65400" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:21+01:00" level=info msg="Created producer" 
name=standalone-0-88 topic="persistent://public/default/test-topic-6"
   consumer1 key is: key-shared-0, value is: value-0
   consumer1 key is: key-shared-1, value is: value-1
   consumer1 key is: key-shared-2, value is: value-2
   consumer1 key is: key-shared-0, value is: value-3
   consumer1 key is: key-shared-1, value is: value-4
   consumer1 key is: key-shared-2, value is: value-5
   consumer1 key is: key-shared-0, value is: value-6
   consumer1 key is: key-shared-1, value is: value-7
   consumer1 key is: key-shared-2, value is: value-8
   consumer1 key is: key-shared-0, value is: value-9
   time="2019-10-11T14:29:23+01:00" level=info msg="Closing producer" 
name=standalone-0-88 topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closed producer" 
name=standalone-0-88 topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-topic-6"
   --- FAIL: TestConsumerKeyShared (2.07s)
       testing.go:853: race detected during execution of test
   --- FAIL: TestPartitionTopicsConsumerPubSub (0.00s)
       consumer_test.go:282: Put 
http://localhost:8080/admin/v2/persistent/public/default/testGetPartitions/partitions:
 dial tcp [::1]:8080: connect: connection refused
   time="2019-10-11T14:29:23+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003bc150 by goroutine 12:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0003bc150 by goroutine 13:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsync()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:431
 +0x269
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 12 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsync()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:431
 +0x269
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 13 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003bc0f0 by goroutine 12:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0003bc0f0 by goroutine 13:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsync()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:431
 +0x269
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 12 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsync()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:431
 +0x269
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 13 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:23+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65403" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65404" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Created producer" 
name=standalone-0-89 topic="persistent://public/default/receive-async"
   time="2019-10-11T14:29:23+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/receive-async"
   receive message payload is:hello-0
   receive message payload is:hello-1
   receive message payload is:hello-2
   receive message payload is:hello-3
   receive message payload is:hello-4
   receive message payload is:hello-5
   receive message payload is:hello-6
   receive message payload is:hello-7
   receive message payload is:hello-8
   receive message payload is:hello-9
   time="2019-10-11T14:29:23+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/receive-async"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/receive-async"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closing producer" 
name=standalone-0-89 topic="persistent://public/default/receive-async"
   time="2019-10-11T14:29:23+01:00" level=info msg="Closed producer" 
name=standalone-0-89 topic="persistent://public/default/receive-async"
   --- FAIL: TestConsumer_ReceiveAsync (0.07s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:23+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003bc230 by goroutine 28:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0003bc230 by goroutine 29:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerAckTimeout()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:490
 +0x2a9
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 28 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerAckTimeout()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:490
 +0x2a9
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 29 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003bc1d0 by goroutine 28:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0003bc1d0 by goroutine 29:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerAckTimeout()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:490
 +0x2a9
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 28 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.singleTopicSubscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:86
 +0x22f
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_consumer.go:73
 +0x27e
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:100
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumerAckTimeout()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:490
 +0x2a9
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 29 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:23+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65405" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65406" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:23+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:23+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:23+01:00" level=info msg="Created producer" 
name=standalone-0-90 
topic="persistent://public/default/test-ack-timeout-topic-1"
   start redeliver messages...
   redeliver messages, payload is:hello-0
   redeliver messages, payload is:hello-1
   redeliver messages, payload is:hello-2
   redeliver messages, payload is:hello-3
   redeliver messages, payload is:hello-4
   time="2019-10-11T14:29:35+01:00" level=info msg="Closing producer" 
name=standalone-0-90 
topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:35+01:00" level=info msg="Closed producer" 
name=standalone-0-90 
topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:35+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:35+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:35+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   time="2019-10-11T14:29:35+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-ack-timeout-topic-1"
   --- FAIL: TestConsumerAckTimeout (12.03s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:35+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c000214310 by goroutine 31:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000214310 by goroutine 47:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsyncWithCallback()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:614
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 31 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsyncWithCallback()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:614
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 47 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0002142b0 by goroutine 31:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0002142b0 by goroutine 47:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsyncWithCallback()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:614
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 31 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     
github.com/apache/pulsar-client-go/pulsar.TestConsumer_ReceiveAsyncWithCallback()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:614
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 47 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:35+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65416" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:35+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:35+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65417" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created producer" 
name=standalone-0-91 
topic="persistent://public/default/receive-async-with-callback"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/receive-async-with-callback"
   receive message payload is:hello-0
   receive message payload is:hello-1
   receive message payload is:hello-2
   receive message payload is:hello-3
   receive message payload is:hello-4
   receive message payload is:hello-5
   receive message payload is:hello-6
   receive message payload is:hello-7
   receive message payload is:hello-8
   receive message payload is:hello-9
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/receive-async-with-callback"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/receive-async-with-callback"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing producer" 
name=standalone-0-91 
topic="persistent://public/default/receive-async-with-callback"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed producer" 
name=standalone-0-91 
topic="persistent://public/default/receive-async-with-callback"
   --- FAIL: TestConsumer_ReceiveAsyncWithCallback (0.08s)
       testing.go:853: race detected during execution of test
   --- FAIL: TestConsumer_Shared (0.00s)
       consumer_test.go:282: Put 
http://localhost:8080/admin/v2/persistent/public/default/testMultiPartitionConsumerShared/partitions:
 dial tcp [::1]:8080: connect: connection refused
   --- FAIL: TestConsumer_Seek (0.00s)
       consumer_test.go:282: Put 
http://localhost:8080/admin/v2/persistent/public/default/testSeek: dial tcp 
[::1]:8080: connect: connection refused
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0002143f0 by goroutine 83:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0002143f0 by goroutine 86:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_EventTime()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:805
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 83 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_EventTime()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:805
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 86 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c000214390 by goroutine 83:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000214390 by goroutine 86:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_EventTime()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:805
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 83 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_EventTime()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:805
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 86 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65422" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65423" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created producer" 
name=standalone-0-92 topic="persistent://public/default/test-event-time"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-event-time"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-event-time"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-event-time"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing producer" 
name=standalone-0-92 topic="persistent://public/default/test-event-time"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Got unexpected message: 
ledgerId:25 entryId:2 partition:-1 " consumerID=1 laddr="[::1]:65423" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed producer" 
name=standalone-0-92 topic="persistent://public/default/test-event-time"
   --- FAIL: TestConsumer_EventTime (0.03s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c000154230 by goroutine 21:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000154230 by goroutine 20:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_Flow()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:842
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 21 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_Flow()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:842
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 20 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001541d0 by goroutine 21:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001541d0 by goroutine 20:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_Flow()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:842
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 21 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestConsumer_Flow()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/consumer_test.go:842
 +0x243
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 20 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65424" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65425" raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created producer" 
name=standalone-0-93 
topic="persistent://public/default/test-received-since-flow"
   time="2019-10-11T14:29:36+01:00" level=info msg="Created consumer" 
name="<nil>" topic="persistent://public/default/test-received-since-flow"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing producer" 
name=standalone-0-93 
topic="persistent://public/default/test-received-since-flow"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed producer" 
name=standalone-0-93 
topic="persistent://public/default/test-received-since-flow"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closing consumer" 
name="<nil>" topic="persistent://public/default/test-received-since-flow"
   time="2019-10-11T14:29:36+01:00" level=info msg="Closed consumer" 
name="<nil>" topic="persistent://public/default/test-received-since-flow"
   --- FAIL: TestConsumer_Flow (0.51s)
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:36+01:00" level=warning msg="Got unexpected message: 
ledgerId:27 entryId:101 partition:-1 " consumerID=1 laddr="[::1]:65425" 
raddr="pulsar://localhost:6650"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   --- FAIL: TestTLSInsecureConnection (0.00s)
       impl_client_test.go:65: 
                Error Trace:    impl_client_test.go:65
                Error:          Received unexpected error:
                                connection error
                Test:           TestTLSInsecureConnection
       impl_client_test.go:66: 
                Error Trace:    impl_client_test.go:66
                Error:          Expected value not to be nil.
                Test:           TestTLSInsecureConnection
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   --- FAIL: TestTLSConnection (0.00s)
       impl_client_test.go:83: 
                Error Trace:    impl_client_test.go:83
                Error:          Received unexpected error:
                                connection error
                Test:           TestTLSConnection
       impl_client_test.go:84: 
                Error Trace:    impl_client_test.go:84
                Error:          Expected value not to be nil.
                Test:           TestTLSConnection
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   --- FAIL: TestTLSConnectionHostNameVerification (0.00s)
       impl_client_test.go:102: 
                Error Trace:    impl_client_test.go:102
                Error:          Received unexpected error:
                                connection error
                Test:           TestTLSConnectionHostNameVerification
       impl_client_test.go:103: 
                Error Trace:    impl_client_test.go:103
                Error:          Expected value not to be nil.
                Test:           TestTLSConnectionHostNameVerification
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://127.0.0.1:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp 127.0.0.1:6651: connect: connection refused" 
raddr="pulsar+ssl://127.0.0.1:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://127.0.0.1:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=warning msg="Failed to connect to 
broker." error="dial tcp [::1]:6651: connect: connection refused" 
raddr="pulsar+ssl://localhost:6651"
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection closed" 
raddr="pulsar+ssl://localhost:6651"
   --- FAIL: TestTLSAuth (0.00s)
       impl_client_test.go:158: 
                Error Trace:    impl_client_test.go:158
                Error:          Received unexpected error:
                                connection error
                Test:           TestTLSAuth
       impl_client_test.go:159: 
                Error Trace:    impl_client_test.go:159
                Error:          Expected value not to be nil.
                Test:           TestTLSAuth
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c000214690 by goroutine 128:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000214690 by goroutine 19:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuth()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:175
 +0x2b1
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 128 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuth()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:175
 +0x2b1
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 19 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c000214630 by goroutine 128:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c000214630 by goroutine 19:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuth()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:175
 +0x2b1
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 128 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuth()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:175
 +0x2b1
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 19 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65439" raddr="pulsar://localhost:6650"
   --- FAIL: TestTokenAuth (0.01s)
       impl_client_test.go:179: 
                Error Trace:    impl_client_test.go:179
                Error:          Received unexpected error:
                                MetadataError: LookupError
                Test:           TestTokenAuth
       impl_client_test.go:180: 
                Error Trace:    impl_client_test.go:180
                Error:          Expected value not to be nil.
                Test:           TestTokenAuth
       testing.go:853: race detected during execution of test
   time="2019-10-11T14:29:36+01:00" level=info msg="Connecting to broker" 
raddr="pulsar://localhost:6650"
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c4850 by goroutine 131:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:189
 +0x7df
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c4850 by goroutine 23:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xa9
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuthFromFile()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:193
 +0x1fc
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 131 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuthFromFile()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:193
 +0x1fc
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 23 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   ==================
   WARNING: DATA RACE
   Write at 0x00c0001c47f0 by goroutine 131:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).connect()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:191
 +0x888
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start.func1()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:148
 +0x3c
   
   Previous read at 0x00c0001c47f0 by goroutine 23:
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connection).waitUntilReady()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:235
 +0xcc
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:75
 +0x437
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuthFromFile()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:193
 +0x1fc
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 131 (running) created at:
     github.com/apache/pulsar-client-go/pulsar/internal.(*connection).start()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection.go:147
 +0x4c
     
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/connection_pool.go:72
 +0x4cf
     github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:75
 +0x8a
     
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/internal/rpc_client.go:69
 +0xaf
     github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:120
 +0x246
     github.com/apache/pulsar-client-go/pulsar.newProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_producer.go:64
 +0x1ef
     github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client.go:92
 +0xa6
     github.com/apache/pulsar-client-go/pulsar.TestTokenAuthFromFile()
         
/Users/filcho/go/src/github.com/apache/pulsar-client-go/pulsar/impl_client_test.go:193
 +0x1fc
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
   
   Goroutine 23 (running) created at:
     testing.(*T).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:960 +0x651
     testing.runTests.func1()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1202 +0xa6
     testing.tRunner()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:909 +0x199
     testing.runTests()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1200 +0x521
     testing.(*M).Run()
         /usr/local/Cellar/go/1.13/libexec/src/testing/testing.go:1117 +0x2ff
     main.main()
         _testmain.go:120 +0x223
   ==================
   time="2019-10-11T14:29:36+01:00" level=info msg="Connection is ready" 
laddr="[::1]:65440" raddr="pulsar://localhost:6650"
   --- FAIL: TestTokenAuthFromFile (0.01s)
       impl_client_test.go:197: 
                Error Trace:    impl_client_test.go:197
                Error:          Received unexpected error:
                                MetadataError: LookupError
                Test:           TestTokenAuthFromFile
       impl_client_test.go:198: 
                Error Trace:    impl_client_test.go:198
                Error:          Expected value not to be nil.
                Test:           TestTokenAuthFromFile
       testing.go:853: race detected during execution of test
   2019/10/11 14:29:36 Put 
http://localhost:8080/admin/v2/persistent/public/default/TestGetTopicPartitions/partitions:
 dial tcp [::1]:8080: connect: connection refused
   FAIL github.com/apache/pulsar-client-go/pulsar       15.415s
   ok   github.com/apache/pulsar-client-go/pulsar/internal      (cached)
   ok   github.com/apache/pulsar-client-go/util (cached)
   FAIL
   ```
   
   Tell us what happens instead
   
   #### Steps to reproduce
   
   go test ./... -race
   
   How can we reproduce the issue
   
   #### System configuration
   **Pulsar package version**: v0.0.0-20191008060812-61388933d356
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to