@@ -20,6 +20,7 @@ describe('Admin > listGroups', () => {
2020        consumer  =  createConsumer ( { 
2121            groupId, 
2222            fromBeginning : true , 
23+             autoCommit : true , 
2324        } ) ; 
2425
2526        await  createTopic ( {  topic : topicName ,  partitions : 2  } ) ; 
@@ -47,11 +48,12 @@ describe('Admin > listGroups', () => {
4748        await  consumer . run ( {  eachMessage : async  ( )  =>  { }  } ) ; 
4849
4950        await  waitFor ( ( )  =>  consumer . assignment ( ) . length  >  0 ,  ( )  =>  null ,  1000 ) ; 
51+         const  groupType  =  testConsumerGroupProtocolClassic ( )  ? ConsumerGroupTypes . CLASSIC  : ConsumerGroupTypes . CONSUMER ; 
5052
5153        await  admin . connect ( ) ; 
5254        let  listGroupsResult  =  await  admin . listGroups ( { 
53-             matchConsumerGroupStates : undefined , 
54-             matchConsumerGroupTypes : undefined , 
55+             matchConsumerGroupStates : [ ConsumerGroupStates . STABLE , ] , 
56+             matchConsumerGroupTypes : [ groupType , ] , 
5557        } ) ; 
5658        expect ( listGroupsResult . errors ) . toEqual ( [ ] ) ; 
5759        expect ( listGroupsResult . groups ) . toEqual ( 
@@ -61,7 +63,7 @@ describe('Admin > listGroups', () => {
6163                    isSimpleConsumerGroup : false , 
6264                    protocolType : 'consumer' , 
6365                    state : ConsumerGroupStates . STABLE , 
64-                     type : ConsumerGroupTypes . CLASSIC , 
66+                     type : groupType , 
6567                } ) , 
6668            ] ) 
6769        ) ; 
@@ -79,7 +81,7 @@ describe('Admin > listGroups', () => {
7981                    isSimpleConsumerGroup : false , 
8082                    protocolType : 'consumer' , 
8183                    state : ConsumerGroupStates . EMPTY , 
82-                     type : testConsumerGroupProtocolClassic ( )  ?  ConsumerGroupTypes . CLASSIC  :  ConsumerGroupTypes . CONSUMER , 
84+                     type : groupType , 
8385                } ) , 
8486            ] ) 
8587        ) ; 
0 commit comments