You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Nigel Jones (JIRA)" <ji...@apache.org> on 2016/11/18 14:44:58 UTC

[jira] [Created] (RANGER-1222) Unit test failure in TestDefaultPolicyResourceMatcher (Java 8)

Nigel Jones created RANGER-1222:
-----------------------------------

             Summary: Unit test failure in TestDefaultPolicyResourceMatcher (Java 8)
                 Key: RANGER-1222
                 URL: https://issues.apache.org/jira/browse/RANGER-1222
             Project: Ranger
          Issue Type: Bug
         Environment: Maven 3.3.9
Open JDK 1.8
            Reporter: Nigel Jones


I'm interested in getting Ranger to build on Windows.

In the tests below the source was at the same level (current trunk), and maven 3.3.9 was used

 * Build ran run on a CentOS 7 (openjdk 1.7) system 
 * Failure under Windows 10 anniversary (oracle jdk 1.8)
 * failure under win 10 "bash shell" (openjdk 1.8)

In both failure cases the error was:

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE! - in org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher
testDefaultPolicyResourceMatcher(org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher)  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: match failed! :database=finance:MATCH for parent 'finance.tax.ssn':ancestorMatch: resource=RangerResourceImpl={ownerUser={null} elements={database=finance; table=tax; column=ssn; } } expected:<true> but was:<false>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:834)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher.runTest(TestDefaultPolicyResourceMatcher.java:129)
        at org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher.runTests(TestDefaultPolicyResourceMatcher.java:93)
        at org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher.runTestsFromResourceFiles(TestDefaultPolicyResourceMatcher.java:85)
        at org.apache.ranger.plugin.resourcematcher.TestDefaultPolicyResourceMatcher.testDefaultPolicyResourceMatcher(TestDefaultPolicyResourceMatcher.java:77)

I then switched the one working environment to java 8 (openjdk 1.8 build 1.8.0_111-b15) and it then failed. Thus this is a java 8 incompatibility

OpenJDK is support on RHEL until June 2018, though Oracle stopped shipping general java 1.7 public updates in June 2015

Meanwhile Java 1.8 shipped originally in 2014 and is generally vendors preferred version (1.9 looks like mid 2017)

I believe we need to resolve Java 1.8 incompatibilities and ensure Ranger works fully. (a subsequent step may be to drop support for 1.7, though there may be other dependencies esp within the hadoop environment for that to complete)

Not investigated the fix yet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)