@@ -20,6 +20,7 @@ describe('Admin > listGroups', () => {
20
20
consumer = createConsumer ( {
21
21
groupId,
22
22
fromBeginning : true ,
23
+ autoCommit : true ,
23
24
} ) ;
24
25
25
26
await createTopic ( { topic : topicName , partitions : 2 } ) ;
@@ -47,11 +48,12 @@ describe('Admin > listGroups', () => {
47
48
await consumer . run ( { eachMessage : async ( ) => { } } ) ;
48
49
49
50
await waitFor ( ( ) => consumer . assignment ( ) . length > 0 , ( ) => null , 1000 ) ;
51
+ const groupType = testConsumerGroupProtocolClassic ( ) ? ConsumerGroupTypes . CLASSIC : ConsumerGroupTypes . CONSUMER ;
50
52
51
53
await admin . connect ( ) ;
52
54
let listGroupsResult = await admin . listGroups ( {
53
- matchConsumerGroupStates : undefined ,
54
- matchConsumerGroupTypes : undefined ,
55
+ matchConsumerGroupStates : [ ConsumerGroupStates . STABLE , ] ,
56
+ matchConsumerGroupTypes : [ groupType , ] ,
55
57
} ) ;
56
58
expect ( listGroupsResult . errors ) . toEqual ( [ ] ) ;
57
59
expect ( listGroupsResult . groups ) . toEqual (
@@ -61,7 +63,7 @@ describe('Admin > listGroups', () => {
61
63
isSimpleConsumerGroup : false ,
62
64
protocolType : 'consumer' ,
63
65
state : ConsumerGroupStates . STABLE ,
64
- type : ConsumerGroupTypes . CLASSIC ,
66
+ type : groupType ,
65
67
} ) ,
66
68
] )
67
69
) ;
@@ -79,7 +81,7 @@ describe('Admin > listGroups', () => {
79
81
isSimpleConsumerGroup : false ,
80
82
protocolType : 'consumer' ,
81
83
state : ConsumerGroupStates . EMPTY ,
82
- type : testConsumerGroupProtocolClassic ( ) ? ConsumerGroupTypes . CLASSIC : ConsumerGroupTypes . CONSUMER ,
84
+ type : groupType ,
83
85
} ) ,
84
86
] )
85
87
) ;
0 commit comments