@@ -309,7 +309,7 @@ func createTopic(t *testing.T, topic string, partitions int) {
309
309
ReplicationFactor : 1 ,
310
310
},
311
311
},
312
- Timeout : milliseconds (time .Second ),
312
+ Timeout : milliseconds (5 * time .Second ),
313
313
})
314
314
if err != nil {
315
315
if ! errors .Is (err , TopicAlreadyExists ) {
@@ -364,8 +364,8 @@ func waitForTopic(ctx context.Context, t *testing.T, topic string) {
364
364
}
365
365
}
366
366
367
- t .Logf ("retrying after 1s " )
368
- time .Sleep (time .Second )
367
+ t .Logf ("retrying after 100ms " )
368
+ time .Sleep (100 * time .Millisecond )
369
369
continue
370
370
}
371
371
}
@@ -1559,17 +1559,22 @@ func TestConsumerGroupWithGroupTopicsSingle(t *testing.T) {
1559
1559
}
1560
1560
}
1561
1561
1562
- func TestConsumerGroupWithGroupTopicsMultple (t * testing.T ) {
1563
- ctx , cancel := context .WithTimeout (context .Background (), 10 * time .Second )
1562
+ func TestConsumerGroupWithGroupTopicsMultiple (t * testing.T ) {
1563
+ ctx , cancel := context .WithTimeout (context .Background (), 20 * time .Second )
1564
1564
defer cancel ()
1565
1565
1566
1566
client , shutdown := newLocalClient ()
1567
1567
defer shutdown ()
1568
-
1568
+ t1 := makeTopic ()
1569
+ createTopic (t , t1 , 1 )
1570
+ defer deleteTopic (t , t1 )
1571
+ t2 := makeTopic ()
1572
+ createTopic (t , t2 , 1 )
1573
+ defer deleteTopic (t , t2 )
1569
1574
conf := ReaderConfig {
1570
1575
Brokers : []string {"localhost:9092" },
1571
1576
GroupID : makeGroupID (),
1572
- GroupTopics : []string {makeTopic (), makeTopic () },
1577
+ GroupTopics : []string {t1 , t2 },
1573
1578
MaxWait : time .Second ,
1574
1579
PartitionWatchInterval : 100 * time .Millisecond ,
1575
1580
WatchPartitionChanges : true ,
0 commit comments