Class AuthorizerConfigTest
java.lang.Object
org.apache.kafka.server.authorizer.AuthorizerConfigTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidsetUp()voidvoidtearDown()voidvoidvoidvoidvoidRegression test for the gauge's label-drift trap: its MetricName embeds the effective max-acls in the tag set, butAuthorizerConfig.setDefaultMaxAcls(Integer)(and the tenant-default branch ofAuthorizerConfig.setTenantMaxAcls(Optional, Optional)) update the effective value without re-registering the gauge.voidvoidvoidvoidvoidRegression for the typo where the "remove" branch ofAuthorizerConfig.loadNewTenantIdToAclCount(Map)calledaddAclCountMetricinstead ofdeleteAclCountMetric, leaving stale gauges registered after a tenant's ACLs drained.
-
Constructor Details
-
AuthorizerConfigTest
public AuthorizerConfigTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
tearDown
@AfterEach public void tearDown() -
testDefaultMaxAcls
@Test public void testDefaultMaxAcls() -
testMaxAcls
@Test public void testMaxAcls() -
testGaugeTagsExposeTenantAndMaxAcls
@Test public void testGaugeTagsExposeTenantAndMaxAcls() -
testAddAclCountMetricRegistersGaugeReadingZeroForLkcWithoutAcls
@Test public void testAddAclCountMetricRegistersGaugeReadingZeroForLkcWithoutAcls() -
testGaugeTracksLoadedCount
@Test public void testGaugeTracksLoadedCount() -
testStaleGaugesAreDeregisteredOnTenantDrained
@Test public void testStaleGaugesAreDeregisteredOnTenantDrained()Regression for the typo where the "remove" branch ofAuthorizerConfig.loadNewTenantIdToAclCount(Map)calledaddAclCountMetricinstead ofdeleteAclCountMetric, leaving stale gauges registered after a tenant's ACLs drained. -
testMetricRegistrationIsNoOpWithoutMetrics
@Test public void testMetricRegistrationIsNoOpWithoutMetrics() -
testGaugeIsDeregisteredAfterEffectiveMaxAclsDrift
@Test public void testGaugeIsDeregisteredAfterEffectiveMaxAclsDrift()Regression test for the gauge's label-drift trap: its MetricName embeds the effective max-acls in the tag set, butAuthorizerConfig.setDefaultMaxAcls(Integer)(and the tenant-default branch ofAuthorizerConfig.setTenantMaxAcls(Optional, Optional)) update the effective value without re-registering the gauge. Reconstructing the MetricName at deletion time would miss the registered gauge in those cases; using the recorded name avoids the leak. -
tenantConfigSourceIsConsultedAfterPushButBeforeBrokerDefault
@Test public void tenantConfigSourceIsConsultedAfterPushButBeforeBrokerDefault() -
pushOverrideBeatsTenantConfigSource
@Test public void pushOverrideBeatsTenantConfigSource() -
tenantConfigSourceIsLazilyConsulted
@Test public void tenantConfigSourceIsLazilyConsulted() -
nullTenantIdSkipsTenantConfigSource
@Test public void nullTenantIdSkipsTenantConfigSource() -
emptySourceFallsThroughToBrokerDefault
@Test public void emptySourceFallsThroughToBrokerDefault() -
sourceEntryWithoutKeyFallsThroughToBrokerDefault
@Test public void sourceEntryWithoutKeyFallsThroughToBrokerDefault() -
nullTenantConfigSourceIsRejected
@Test public void nullTenantConfigSourceIsRejected()
-