MINOR: Fix kafka.server.RequestQuotaTest missing new ApiKeys.
The test was broken by commit
Reviewers: Chia-Ping Tsai Colin P. McCabe
@@ -34,6 +34,7 @@ import org.apache.kafka.common.message._
import org.apache.kafka.common.metrics.{KafkaMetric, Quota, Sensor}
import org.apache.kafka.common.network.ListenerName
import org.apache.kafka.common.protocol.ApiKeys
+import org.apache.kafka.common.quota.ClientQuotaFilter
import org.apache.kafka.common.record._
import org.apache.kafka.common.requests._
import org.apache.kafka.common.resource.{PatternType, ResourceType => AdminResourceType}
@@ -522,6 +523,12 @@ class RequestQuotaTest extends BaseRequestTest {
new OffsetDeleteRequestData.OffsetDeleteRequestPartition()
.setPartitionIndex(0)))).iterator())))
+ case ApiKeys.DESCRIBE_CLIENT_QUOTAS =>
+ new DescribeClientQuotasRequest.Builder(ClientQuotaFilter.all())
+
+ case ApiKeys.ALTER_CLIENT_QUOTAS =>
+ new AlterClientQuotasRequest.Builder(List.empty.asJava, false)
+
case _ =>
throw new IllegalArgumentException("Unsupported API key " + apiKey)
}
