Chia-Ping Tsai created KAFKA-21135:
--------------------------------------

             Summary: Add unit tests for the rate metrics of StandardAuthorizer
                 Key: KAFKA-21135
                 URL: https://issues.apache.org/jira/browse/KAFKA-21135
             Project: Kafka
          Issue Type: Test
            Reporter: Chia-Ping Tsai
            Assignee: Chia-Ping Tsai


{code:java}
            authorizationAllowedSensor = 
metrics.addSensor("authorizer-authorization-allowed");
            authorizationAllowedSensor.add(
                    metrics.metricName("authorization-allowed-rate-per-minute", 
"The number of authorization allowed per minute", new LinkedHashMap<>()),
                    new Rate(TimeUnit.MINUTES, new WindowedCount()));           
 authorizationDeniedSensor = 
metrics.addSensor("authorizer-authorization-denied");
            authorizationDeniedSensor.add(
                    metrics.metricName("authorization-denied-rate-per-minute", 
"The number of authorization denied per minute", new LinkedHashMap<>()),
                    new Rate(TimeUnit.MINUTES, new WindowedCount()));           
 authorizationRequestSensor = 
metrics.addSensor("authorizer-authorization-request");
            authorizationRequestSensor.add(
                    metrics.metricName("authorization-request-rate-per-minute", 
"The number of authorization request per minute", new LinkedHashMap<>()),
                    new Rate(TimeUnit.MINUTES, new WindowedCount())); {code}
Those metrics need unit tests! acls-total-count will be covered by 
https://github.com/apache/kafka/pull/23521



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to