SENTRY-1429, SENTRY-1454: fix flaky TestHDFSIntegration, refactor this huge test class, improve its cleanUp and setUp for temp HDFS dirs; divide test class into smoke test class and p2 test class; in post commit run, we will only run smoke tests. (Anne Yu, reviewed by Sravya Tirukkovalur and Hao Hao)
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/e84890ae Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/e84890ae Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/e84890ae Branch: refs/heads/master Commit: e84890aede5560a0d8c005ad00bda54117d3ecb1 Parents: df2b273 Author: Anne Yu <ann...@cloudera.com> Authored: Fri Aug 26 17:04:19 2016 -0700 Committer: Anne Yu <ann...@cloudera.com> Committed: Fri Sep 2 10:02:34 2016 -0700 ---------------------------------------------------------------------- pom.xml | 1 + .../tests/e2e/hdfs/TestHDFSIntegration.java | 2 +- .../tests/e2e/hdfs/TestHDFSIntegration.java | 2101 ------------------ .../e2e/hdfs/TestHDFSIntegrationAdvanced.java | 793 +++++++ .../tests/e2e/hdfs/TestHDFSIntegrationBase.java | 778 +++++++ .../e2e/hdfs/TestHDFSIntegrationEnd2End.java | 530 +++++ .../e2e/hdfs/TestHDFSIntegrationWithHA.java | 6 +- 7 files changed, 2106 insertions(+), 2105 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sentry/blob/e84890ae/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index b53e776..4eb7d5f 100644 --- a/pom.xml +++ b/pom.xml @@ -976,6 +976,7 @@ limitations under the License. </systemPropertyVariables> <excludes combine.children="append"> <exclude>%regex[org.apache.sentry.tests.e2e.dbprovider.*.class]</exclude> + <exclude>%regex[org.apache.sentry.tests.e2e.hdfs.TestHDFS.*.class]</exclude> </excludes> </configuration> </plugin> http://git-wip-us.apache.org/repos/asf/sentry/blob/e84890ae/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java b/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java index a2aead0..9b986d7 100644 --- a/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java +++ b/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java @@ -1007,7 +1007,7 @@ public class TestHDFSIntegration { miniDFS.getFileSystem().mkdirs(tmpHDFSDir); } - miniDFS.getFileSystem().setPermission(tmpHDFSDir, FsPermission.valueOf("drwxrwx---")); + miniDFS.getFileSystem().setPermission(tmpHDFSDir, FsPermission.valueOf("drwxrwx--x")); Path partitionDir = new Path("/tmp/external/p1"); if (!miniDFS.getFileSystem().exists(partitionDir)) { miniDFS.getFileSystem().mkdirs(partitionDir);