kafka git commit: KAFKA-5433; Close SimpleAclAuthorizer in test to close ZK client
Repository: kafka Updated Branches: refs/heads/0.11.0 4508fb2e4 -> 26c6a0715 KAFKA-5433; Close SimpleAclAuthorizer in test to close ZK client Author: Rajini SivaramReviewers: Ismael Juma Closes #3304 from rajinisivaram/KAFKA-5433 (cherry picked from commit 46db2c5b99de05591274241c70378d845ee4c847) Signed-off-by: Rajini Sivaram Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/26c6a071 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/26c6a071 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/26c6a071 Branch: refs/heads/0.11.0 Commit: 26c6a07152a243481c64598913449fa78709519a Parents: 4508fb2 Author: Rajini Sivaram Authored: Mon Jun 12 16:49:41 2017 +0100 Committer: Rajini Sivaram Committed: Mon Jun 12 16:50:14 2017 +0100 -- .../api/SaslSslAdminClientIntegrationTest.scala | 22 1 file changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kafka/blob/26c6a071/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala -- diff --git a/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala b/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala index 815d3a4..d0e0806 100644 --- a/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala @@ -38,15 +38,19 @@ class SaslSslAdminClientIntegrationTest extends AdminClientIntegrationTest with override def configureSecurityBeforeServersStart() { val authorizer = CoreUtils.createObject[Authorizer](classOf[SimpleAclAuthorizer].getName()) -authorizer.configure(this.configs.head.originals()) -authorizer.addAcls(Set(new AuthAcl(AuthAcl.WildCardPrincipal, Allow, -AuthAcl.WildCardHost, All)), new AuthResource(Topic, "*")) -authorizer.addAcls(Set(clusterAcl(Allow, Create), - clusterAcl(Allow, Delete), - clusterAcl(Allow, ClusterAction), - clusterAcl(Allow, AlterConfigs), - clusterAcl(Allow, Alter)), - AuthResource.ClusterResource) +try { + authorizer.configure(this.configs.head.originals()) + authorizer.addAcls(Set(new AuthAcl(AuthAcl.WildCardPrincipal, Allow, + AuthAcl.WildCardHost, All)), new AuthResource(Topic, "*")) + authorizer.addAcls(Set(clusterAcl(Allow, Create), + clusterAcl(Allow, Delete), + clusterAcl(Allow, ClusterAction), + clusterAcl(Allow, AlterConfigs), + clusterAcl(Allow, Alter)), + AuthResource.ClusterResource) +} finally { + authorizer.close() +} } @Before
kafka git commit: KAFKA-5433; Close SimpleAclAuthorizer in test to close ZK client
Repository: kafka Updated Branches: refs/heads/trunk a623d8fe3 -> 46db2c5b9 KAFKA-5433; Close SimpleAclAuthorizer in test to close ZK client Author: Rajini SivaramReviewers: Ismael Juma Closes #3304 from rajinisivaram/KAFKA-5433 Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/46db2c5b Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/46db2c5b Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/46db2c5b Branch: refs/heads/trunk Commit: 46db2c5b99de05591274241c70378d845ee4c847 Parents: a623d8f Author: Rajini Sivaram Authored: Mon Jun 12 16:49:41 2017 +0100 Committer: Rajini Sivaram Committed: Mon Jun 12 16:49:41 2017 +0100 -- .../api/SaslSslAdminClientIntegrationTest.scala | 22 1 file changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kafka/blob/46db2c5b/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala -- diff --git a/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala b/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala index 815d3a4..d0e0806 100644 --- a/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/api/SaslSslAdminClientIntegrationTest.scala @@ -38,15 +38,19 @@ class SaslSslAdminClientIntegrationTest extends AdminClientIntegrationTest with override def configureSecurityBeforeServersStart() { val authorizer = CoreUtils.createObject[Authorizer](classOf[SimpleAclAuthorizer].getName()) -authorizer.configure(this.configs.head.originals()) -authorizer.addAcls(Set(new AuthAcl(AuthAcl.WildCardPrincipal, Allow, -AuthAcl.WildCardHost, All)), new AuthResource(Topic, "*")) -authorizer.addAcls(Set(clusterAcl(Allow, Create), - clusterAcl(Allow, Delete), - clusterAcl(Allow, ClusterAction), - clusterAcl(Allow, AlterConfigs), - clusterAcl(Allow, Alter)), - AuthResource.ClusterResource) +try { + authorizer.configure(this.configs.head.originals()) + authorizer.addAcls(Set(new AuthAcl(AuthAcl.WildCardPrincipal, Allow, + AuthAcl.WildCardHost, All)), new AuthResource(Topic, "*")) + authorizer.addAcls(Set(clusterAcl(Allow, Create), + clusterAcl(Allow, Delete), + clusterAcl(Allow, ClusterAction), + clusterAcl(Allow, AlterConfigs), + clusterAcl(Allow, Alter)), + AuthResource.ClusterResource) +} finally { + authorizer.close() +} } @Before