Close SimpleAclAuthorizer in test to close ZK client
Author: Rajini Sivaram
Reviewers: Ismael Juma
Closes from rajinisivaram/KAFKA-5433
@@ -38,6 +38,7 @@ class SaslSslAdminClientIntegrationTest extends AdminClientIntegrationTest with
override def configureSecurityBeforeServersStart() {
val authorizer = CoreUtils.createObject[Authorizer](classOf[SimpleAclAuthorizer].getName())
+ try {
authorizer.configure(this.configs.head.originals())
authorizer.addAcls(Set(new AuthAcl(AuthAcl.WildCardPrincipal, Allow,
AuthAcl.WildCardHost, All)), new AuthResource(Topic, "*"))
@@ -47,6 +48,9 @@ class SaslSslAdminClientIntegrationTest extends AdminClientIntegrationTest with
clusterAcl(Allow, AlterConfigs),
clusterAcl(Allow, Alter)),
AuthResource.ClusterResource)
+ } finally {
+ authorizer.close()
+ }
}
@Before
