You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org> on 2019/05/16 00:23:45 UTC
[Impala-ASF-CR] IMPALA-8541: Remove existing roles in order to not interfere with a test.
Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/13349
Change subject: IMPALA-8541: Remove existing roles in order to not interfere with a test.
......................................................................
IMPALA-8541: Remove existing roles in order to not interfere with a test.
The test TestShortUsernameUsed() in AuthorizationTest.java would fail if the
current user is associated with some role granted the privilege to access some
databases, e.g., the database "functional".
Specifically, for the SQL statement "select * from alltypes", if the role is
already granted the privilege to access the database "functional", only
AnalysisException will be thrown. To address this issue, we remove all the
lingering roles before running this test.
Testing:
Passed all the tests in AuthorizationTest.java.
Change-Id: I7122ee0cc90eaf7d45c5637c28c9cdb59502967b
---
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTest.java
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/13349/1
--
To view, visit http://gerrit.cloudera.org:8080/13349
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7122ee0cc90eaf7d45c5637c28c9cdb59502967b
Gerrit-Change-Number: 13349
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
[Impala-ASF-CR] IMPALA-8541: Remove existing roles in order to not interfere with a test.
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has abandoned this change. ( http://gerrit.cloudera.org:8080/13349 )
Change subject: IMPALA-8541: Remove existing roles in order to not interfere with a test.
......................................................................
Abandoned
We probably don't need it.
--
To view, visit http://gerrit.cloudera.org:8080/13349
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I7122ee0cc90eaf7d45c5637c28c9cdb59502967b
Gerrit-Change-Number: 13349
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fr...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
[Impala-ASF-CR] IMPALA-8541: Remove existing roles in order to not interfere with a test.
Posted by "Fredy Wijaya (Code Review)" <ge...@cloudera.org>.
Fredy Wijaya has posted comments on this change. ( http://gerrit.cloudera.org:8080/13349 )
Change subject: IMPALA-8541: Remove existing roles in order to not interfere with a test.
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/13349/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13349/1//COMMIT_MSG@7
PS1, Line 7: Remove existing roles in order to not interfere with a test.
reword: Remove existing roles prior to executing the tests in AuthorizationTest
http://gerrit.cloudera.org:8080/#/c/13349/1//COMMIT_MSG@8
PS1, Line 8:
: The test TestShortUsernameUsed() in AuthorizationTest.java would fail if the
: current user is associated with some role granted the privilege to access some
: databases, e.g., the database "functional".
:
: Specifically, for the SQL statement "select * from alltypes", if the role is
: already granted the privilege to access the database "functional", only
: AnalysisException will be thrown. To address this issue, we remove all the
: lingering roles before running this test.
The issue isn't specific to TestShortUsernameUsed(). We can explain the issue in a more generic fashion.
http://gerrit.cloudera.org:8080/#/c/13349/1/fe/src/test/java/org/apache/impala/authorization/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/authorization/AuthorizationTest.java:
http://gerrit.cloudera.org:8080/#/c/13349/1/fe/src/test/java/org/apache/impala/authorization/AuthorizationTest.java@438
PS1, Line 438: // Remove existing roles in order to not interfere with this test.
: for (TSentryRole role : sentryService_.listAllRoles(USER)) {
: AUTHZ_CATALOG.removeRole(role.getRoleName());
: }
We should do that in the @BeforeClass. Also, we don't actually need to remove the roles in Sentry. We can just remove the roles from the catalog, e.g.
AUTHZ_CATALOG.getAuthPolicy().getAllRoles().forEach(
role -> AUTHZ_CATALOG.getAuthPolicy().removeRole(role.getName()));
--
To view, visit http://gerrit.cloudera.org:8080/13349
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7122ee0cc90eaf7d45c5637c28c9cdb59502967b
Gerrit-Change-Number: 13349
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 May 2019 14:00:57 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-8541: Remove existing roles in order to not interfere with a test.
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13349 )
Change subject: IMPALA-8541: Remove existing roles in order to not interfere with a test.
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/3245/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/13349
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7122ee0cc90eaf7d45c5637c28c9cdb59502967b
Gerrit-Change-Number: 13349
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 May 2019 01:20:01 +0000
Gerrit-HasComments: No