@@ -309,7 +309,7 @@ func createTopic(t *testing.T, topic string, partitions int) {
309309 ReplicationFactor : 1 ,
310310 },
311311 },
312- Timeout : milliseconds (time .Second ),
312+ Timeout : milliseconds (5 * time .Second ),
313313 })
314314 if err != nil {
315315 if ! errors .Is (err , TopicAlreadyExists ) {
@@ -364,8 +364,8 @@ func waitForTopic(ctx context.Context, t *testing.T, topic string) {
364364 }
365365 }
366366
367- t .Logf ("retrying after 1s " )
368- time .Sleep (time .Second )
367+ t .Logf ("retrying after 100ms " )
368+ time .Sleep (100 * time .Millisecond )
369369 continue
370370 }
371371}
@@ -1559,17 +1559,22 @@ func TestConsumerGroupWithGroupTopicsSingle(t *testing.T) {
15591559 }
15601560}
15611561
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 )
15641564 defer cancel ()
15651565
15661566 client , shutdown := newLocalClient ()
15671567 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 )
15691574 conf := ReaderConfig {
15701575 Brokers : []string {"localhost:9092" },
15711576 GroupID : makeGroupID (),
1572- GroupTopics : []string {makeTopic (), makeTopic () },
1577+ GroupTopics : []string {t1 , t2 },
15731578 MaxWait : time .Second ,
15741579 PartitionWatchInterval : 100 * time .Millisecond ,
15751580 WatchPartitionChanges : true ,
0 commit comments