Return-Path: X-Original-To: apmail-sentry-commits-archive@minotaur.apache.org Delivered-To: apmail-sentry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 662CC19CE3 for ; Tue, 22 Mar 2016 10:42:06 +0000 (UTC) Received: (qmail 59531 invoked by uid 500); 22 Mar 2016 10:42:06 -0000 Delivered-To: apmail-sentry-commits-archive@sentry.apache.org Received: (qmail 59486 invoked by uid 500); 22 Mar 2016 10:42:06 -0000 Mailing-List: contact commits-help@sentry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sentry.apache.org Delivered-To: mailing list commits@sentry.apache.org Received: (qmail 59477 invoked by uid 99); 22 Mar 2016 10:42:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 10:42:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C832F180219 for ; Tue, 22 Mar 2016 10:42:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vI7xyh76o97G for ; Tue, 22 Mar 2016 10:42:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 831A65F3F2 for ; Tue, 22 Mar 2016 10:42:03 +0000 (UTC) Received: (qmail 59407 invoked by uid 99); 22 Mar 2016 10:42:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 10:42:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7955EDFA6C; Tue, 22 Mar 2016 10:42:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sdp@apache.org To: commits@sentry.incubator.apache.org Message-Id: <1c9718a9638c4f6497d26976ba9b1979@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-sentry git commit: SENTRY-1157: Fix Unit Tests TestAclsCrud&TestAuthorize failed (Dapeng Sun, reviewed by Colin Ma) Date: Tue, 22 Mar 2016 10:42:02 +0000 (UTC) Repository: incubator-sentry Updated Branches: refs/heads/master 5720b64d2 -> 4643f988a SENTRY-1157: Fix Unit Tests TestAclsCrud&TestAuthorize failed (Dapeng Sun, reviewed by Colin Ma) Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/4643f988 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/4643f988 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/4643f988 Branch: refs/heads/master Commit: 4643f988a5e0ce2b9749e6365edea3a16482de86 Parents: 5720b64 Author: Sun Dapeng Authored: Tue Mar 22 18:40:15 2016 +0800 Committer: Sun Dapeng Committed: Tue Mar 22 18:40:15 2016 +0800 ---------------------------------------------------------------------- .../java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java | 4 ++-- .../main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4643f988/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java b/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java index 85e7d21..2a3b317 100644 --- a/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java +++ b/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/KafkaTestServer.java @@ -39,10 +39,10 @@ public class KafkaTestServer { private File sentrySitePath = null; public KafkaTestServer(File sentrySitePath) throws Exception { - this.zkPort = TestUtils.getFreePort(); - this.kafkaPort = TestUtils.getFreePort(); this.sentrySitePath = sentrySitePath; + this.zkPort = TestUtils.getFreePort(); createZkServer(); + this.kafkaPort = TestUtils.getFreePort(); createKafkaServer(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4643f988/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java b/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java index dda4047..5d36082 100644 --- a/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java +++ b/sentry-tests/sentry-tests-kafka/src/main/java/org/apache/sentry/tests/e2e/kafka/TestUtils.java @@ -23,7 +23,9 @@ public class TestUtils { public static int getFreePort() throws IOException { synchronized (TestUtils.class) { ServerSocket serverSocket = new ServerSocket(0); - return serverSocket.getLocalPort(); + int port = serverSocket.getLocalPort(); + serverSocket.close(); + return port; } } }