@@ -93,30 +93,54 @@ func TestOffsetCommitRequest(t *testing.T) {
93
93
})
94
94
}
95
95
96
- // Version 5 added:
97
- // RequestTopic.RequestPartition.CommitedLeaderEpoc
98
96
// Version 5 removed:
99
97
// RetentionTimeMs
100
- // Fields are the same through version 6.
101
- for _ , version := range []int16 {5 , 6 } {
98
+ for _ , version := range []int16 {5 } {
102
99
prototest .TestRequest (t , version , & offsetcommit.Request {
103
100
GroupID : "group-3" ,
104
101
GenerationID : 1 ,
105
102
MemberID : "member-3" ,
106
103
Topics : []offsetcommit.RequestTopic {
107
104
{
108
105
Name : "topic-3" ,
106
+ Partitions : []offsetcommit.RequestPartition {
107
+ {
108
+ PartitionIndex : 0 ,
109
+ CommittedOffset : 1 ,
110
+ CommittedMetadata : "meta-3-0" ,
111
+ },
112
+ {
113
+ PartitionIndex : 1 ,
114
+ CommittedOffset : 2 ,
115
+ CommittedMetadata : "meta-3-1" ,
116
+ },
117
+ },
118
+ },
119
+ },
120
+ })
121
+ }
122
+
123
+ // Version 6 added:
124
+ // RequestTopic.RequestPartition.CommittedLeaderEpoch
125
+ for _ , version := range []int16 {6 } {
126
+ prototest .TestRequest (t , version , & offsetcommit.Request {
127
+ GroupID : "group-4" ,
128
+ GenerationID : 1 ,
129
+ MemberID : "member-4" ,
130
+ Topics : []offsetcommit.RequestTopic {
131
+ {
132
+ Name : "topic-4" ,
109
133
Partitions : []offsetcommit.RequestPartition {
110
134
{
111
135
PartitionIndex : 0 ,
112
136
CommittedOffset : 1 ,
113
- CommittedMetadata : "meta-3 -0" ,
137
+ CommittedMetadata : "meta-4 -0" ,
114
138
CommittedLeaderEpoch : 10 ,
115
139
},
116
140
{
117
141
PartitionIndex : 1 ,
118
142
CommittedOffset : 2 ,
119
- CommittedMetadata : "meta-3 -1" ,
143
+ CommittedMetadata : "meta-4 -1" ,
120
144
CommittedLeaderEpoch : 11 ,
121
145
},
122
146
},
@@ -129,24 +153,24 @@ func TestOffsetCommitRequest(t *testing.T) {
129
153
// GroupInstanceID
130
154
for _ , version := range []int16 {7 } {
131
155
prototest .TestRequest (t , version , & offsetcommit.Request {
132
- GroupID : "group-4 " ,
156
+ GroupID : "group-5 " ,
133
157
GenerationID : 1 ,
134
- MemberID : "member-4 " ,
135
- GroupInstanceID : "instance-4 " ,
158
+ MemberID : "member-5 " ,
159
+ GroupInstanceID : "instance-5 " ,
136
160
Topics : []offsetcommit.RequestTopic {
137
161
{
138
162
Name : "topic-4" ,
139
163
Partitions : []offsetcommit.RequestPartition {
140
164
{
141
165
PartitionIndex : 0 ,
142
166
CommittedOffset : 1 ,
143
- CommittedMetadata : "meta-4 -0" ,
167
+ CommittedMetadata : "meta-5 -0" ,
144
168
CommittedLeaderEpoch : 10 ,
145
169
},
146
170
{
147
171
PartitionIndex : 1 ,
148
172
CommittedOffset : 2 ,
149
- CommittedMetadata : "meta-4 -1" ,
173
+ CommittedMetadata : "meta-5 -1" ,
150
174
CommittedLeaderEpoch : 11 ,
151
175
},
152
176
},
0 commit comments