ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gautam Borad (JIRA)" <j...@apache.org>
Subject [jira] [Created] (RANGER-770) Fix NullPointerException Unit test cases on master branch
Date Mon, 07 Dec 2015 07:19:11 GMT
Gautam Borad created RANGER-770:
-----------------------------------

             Summary: Fix NullPointerException Unit test cases on master branch
                 Key: RANGER-770
                 URL: https://issues.apache.org/jira/browse/RANGER-770
             Project: Ranger
          Issue Type: Bug
          Components: admin
    Affects Versions: 0.6.0
            Reporter: Gautam Borad
            Assignee: Gautam Borad
             Fix For: 0.6.0


 Fix these 8 NullPointerExceptions  in ranger-admin unit tests.

{code:java}

1. TestServiceREST.test16createPolicyFalse
2015-12-01 20:26:19,927 ERROR [main] rest.ServiceREST: createPolicy(RangerPolicy={id={8} guid={policyguid}
isEnabled={true} createdBy={null} updatedBy={Admin} createTime={Tue Dec 01 20:26:19 PST 2015}
updateTime={Tue Dec 01 20:26:19 PST 2015} version={null} service={HDFS_1-1-20150316062453}
name={HDFS_1-1-20150316062453} policyType={null} description={policy} resourceSignature={null}
isAuditEnabled={true} resources={resource={RangerPolicyResource={values={} isExcludes={true}
isRecursive={true} }} } policyItems={RangerPolicyItem={accessTypes={} users={} groups={} conditions={}
delegateAdmin={false} isEnabled={true} comments={null} }} denyPolicyItems={} allowExceptions={}
denyExceptions={} }) failed
java.lang.NullPointerException
    at org.apache.ranger.rest.ServiceREST.ensureAdminAccess(ServiceREST.java:1840)
    at org.apache.ranger.rest.ServiceREST.createPolicy(ServiceREST.java:1115)
    at org.apache.ranger.rest.TestServiceREST.test16createPolicyFalse(TestServiceREST.java:748)

2. TestServiceREST.test17updatePolicyFalse
2015-12-01 20:26:19,941 ERROR [main] rest.ServiceREST: updatePolicy(RangerPolicy={id={8} guid={policyguid}
isEnabled={true} createdBy={null} updatedBy={Admin} createTime={Tue Dec 01 20:26:19 PST 2015}
updateTime={Tue Dec 01 20:26:19 PST 2015} version={null} service={HDFS_1-1-20150316062453}
name={HDFS_1-1-20150316062453} policyType={null} description={policy} resourceSignature={null}
isAuditEnabled={true} resources={resource={RangerPolicyResource={values={} isExcludes={true}
isRecursive={true} }} } policyItems={RangerPolicyItem={accessTypes={} users={} groups={} conditions={}
delegateAdmin={false} isEnabled={true} comments={null} }} denyPolicyItems={} allowExceptions={}
denyExceptions={} }) failed
java.lang.NullPointerException
    at org.apache.ranger.rest.ServiceREST.ensureAdminAccess(ServiceREST.java:1840)
    at org.apache.ranger.rest.ServiceREST.updatePolicy(ServiceREST.java:1153)
    at org.apache.ranger.rest.TestServiceREST.test17updatePolicyFalse(TestServiceREST.java:783)

3. TestServiceREST.test18deletePolicyFalse
2015-12-01 20:26:19,954 ERROR [main] rest.ServiceREST: deletePolicy(8) failed
java.lang.NullPointerException
    at org.apache.ranger.rest.ServiceREST.deletePolicy(ServiceREST.java:1192)
    at org.apache.ranger.rest.TestServiceREST.test18deletePolicyFalse(TestServiceREST.java:816)

4. TestServiceREST.test19getPolicyFalse
2015-12-01 20:26:19,969 ERROR [main] rest.ServiceREST: getPolicy(8) failed
java.lang.NullPointerException
    at org.apache.ranger.rest.ServiceREST.ensureAdminAccess(ServiceREST.java:1840)
    at org.apache.ranger.rest.ServiceREST.getPolicy(ServiceREST.java:1228)
    at org.apache.ranger.rest.TestServiceREST.test19getPolicyFalse(TestServiceREST.java:847)

5. TestRangerServiceDefServiceBase.test10populateRangerPolicyConditionDefToXX
2015-12-01 20:26:20,349 WARN  [main] service.RangerServiceDefServiceBase: mapToJsonString()
failed to convert map: {}
java.lang.NullPointerException
    at org.apache.ranger.service.RangerServiceDefServiceBase.mapToJsonString(RangerServiceDefServiceBase.java:490)
    at org.apache.ranger.service.RangerServiceDefServiceBase.populateRangerPolicyConditionDefToXX(RangerServiceDefServiceBase.java:334)
    at org.apache.ranger.service.TestRangerServiceDefServiceBase.test10populateRangerPolicyConditionDefToXX(TestRangerServiceDefServiceBase.java:436)

6. TestRangerServiceDefServiceBase.test13populateRangerContextEnricherDefToXX
2015-12-01 20:26:20,358 WARN  [main] service.RangerServiceDefServiceBase: mapToJsonString()
failed to convert map: {}
java.lang.NullPointerException
    at org.apache.ranger.service.RangerServiceDefServiceBase.mapToJsonString(RangerServiceDefServiceBase.java:490)
    at org.apache.ranger.service.RangerServiceDefServiceBase.populateRangerContextEnricherDefToXX(RangerServiceDefServiceBase.java:376)
    at org.apache.ranger.service.TestRangerServiceDefServiceBase.test13populateRangerContextEnricherDefToXX(TestRangerServiceDefServiceBase.java:538)

7. TestRangerServiceDefServiceBase.test1MapViewToEntityBean
2015-12-01 20:26:20,377 WARN  [main] service.RangerServiceDefServiceBase: mapToJsonString()
failed to convert map: {}
java.lang.NullPointerException
    at org.apache.ranger.service.RangerServiceDefServiceBase.mapToJsonString(RangerServiceDefServiceBase.java:490)
    at org.apache.ranger.service.RangerServiceDefServiceBase.mapViewToEntityBean(RangerServiceDefServiceBase.java:165)
    at org.apache.ranger.service.RangerServiceDefService.mapViewToEntityBean(RangerServiceDefService.java:49)
    at org.apache.ranger.service.TestRangerServiceDefServiceBase.test1MapViewToEntityBean(TestRangerServiceDefServiceBase.java:165)

8. TestRangerServiceDefServiceBase.test5populateRangerResourceDefToXX
2015-12-01 20:26:20,395 WARN  [main] service.RangerServiceDefServiceBase: mapToJsonString()
failed to convert map: {}
java.lang.NullPointerException
    at org.apache.ranger.service.RangerServiceDefServiceBase.mapToJsonString(RangerServiceDefServiceBase.java:490)
    at org.apache.ranger.service.RangerServiceDefServiceBase.populateRangerResourceDefToXX(RangerServiceDefServiceBase.java:252)
    at org.apache.ranger.service.TestRangerServiceDefServiceBase.test5populateRangerResourceDefToXX(TestRangerServiceDefServiceBase.java:259)
{code}



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

Mime
View raw message