|
@@ -28,7 +28,7 @@ func TestSimpleConsumer(t *testing.T) {
|
|
|
}
|
|
|
defer client.Close()
|
|
|
|
|
|
- consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", &ConsumerConfig{MaxWaitTime: 100})
|
|
|
+ consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", nil)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
@@ -64,7 +64,10 @@ func TestConsumerRawOffset(t *testing.T) {
|
|
|
}
|
|
|
defer client.Close()
|
|
|
|
|
|
- consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", &ConsumerConfig{OffsetMethod: OffsetMethodManual, OffsetValue: 1234, MaxWaitTime: 100})
|
|
|
+ config := NewConsumerConfig()
|
|
|
+ config.OffsetMethod = OffsetMethodManual
|
|
|
+ config.OffsetValue = 1234
|
|
|
+ consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", config)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
@@ -98,7 +101,9 @@ func TestConsumerLatestOffset(t *testing.T) {
|
|
|
}
|
|
|
defer client.Close()
|
|
|
|
|
|
- consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", &ConsumerConfig{OffsetMethod: OffsetMethodNewest, MaxWaitTime: 100})
|
|
|
+ config := NewConsumerConfig()
|
|
|
+ config.OffsetMethod = OffsetMethodNewest
|
|
|
+ consumer, err := NewConsumer(client, "my_topic", 0, "my_consumer_group", config)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|