pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #168: [Issue-148][pulsar-client-go] add seek by messageID
Date Wed, 08 Jan 2020 17:41:43 GMT
cckellogg commented on a change in pull request #168: [Issue-148][pulsar-client-go] add seek
by messageID
URL: https://github.com/apache/pulsar-client-go/pull/168#discussion_r364354077
 
 

 ##########
 File path: pulsar/test_helper.go
 ##########
 @@ -164,3 +173,55 @@ func topicPath(topic string) string {
 	}
 	return tn.Name
 }
+
+func createClient(t *testing.T) Client {
+	client, err := NewClient(ClientOptions{
+		URL: serviceURL,
+	})
+	assert.Nil(t, err)
+
+	return client
+}
+
+func createConsumer(t *testing.T, client Client, options ConsumerOptions) Consumer {
+	consumer, err := client.Subscribe(options)
+	assert.Nil(t, err)
+
+	return consumer
+}
+
+func createProducer(t *testing.T, client Client, options ProducerOptions) Producer {
+	producer, err := client.CreateProducer(options)
+	assert.Nil(t, err)
+	assert.Equal(t, options.Topic, producer.Topic())
+
+	return producer
+}
+
+func send(t *testing.T, producer Producer, ctx context.Context, times int, message *ProducerMessage)
{
 
 Review comment:
   Check the consumer_regex_test genMessages https://github.com/apache/pulsar-client-go/blob/master/pulsar/consumer_regex_test.go#L361
this might be a way to make it more flexible. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message