[ https://issues.apache.org/jira/browse/RANGER-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated RANGER-4645: ------------------------------------- Summary: Unit test failures in TestSecurityZoneDBStore (was: Unit test failures in TestAssetREST.testCountXAssets and TestXAuditREST.Test8countXAccessAudits) > Unit test failures in TestSecurityZoneDBStore > --------------------------------------------- > > Key: RANGER-4645 > URL: https://issues.apache.org/jira/browse/RANGER-4645 > Project: Ranger > Issue Type: Bug > Components: Ranger > Affects Versions: 3.0.0 > Reporter: Madhan Neethiraj > Assignee: Madhan Neethiraj > Priority: Major > Fix For: 3.0.0 > > Attachments: RANGER-4645.patch > > > Build in master branch ({{{}mvn clean verify install{}}}) fails due to > following 2 unit test failures: > {noformat} > Failed tests: > TestSecurityZoneDBStore.test2updateSecurityZoneById:135 > Wanted but not invoked: > daoManager.getXXSecurityZoneDao(); > -> at > org.apache.ranger.biz.TestSecurityZoneDBStore.test2updateSecurityZoneById(TestSecurityZoneDBStore.java:135) > However, there was exactly 1 interaction with this mock: > daoManager.getXXGlobalState(); > -> at > org.apache.ranger.biz.SecurityZoneDBStore.updateSecurityZoneById(SecurityZoneDBStore.java:125) > TestSecurityZoneDBStore.test9updateSecurityZoneByUnknownId > Expected: an instance of javax.ws.rs.WebApplicationException > but: <java.lang.NullPointerException> is a java.lang.NullPointerException > Stacktrace was: java.lang.NullPointerException > at > org.apache.ranger.biz.SecurityZoneDBStore.updateSecurityZoneById(SecurityZoneDBStore.java:125) > at > org.apache.ranger.biz.TestSecurityZoneDBStore.test9updateSecurityZoneByUnknownId(TestSecurityZoneDBStore.java:312) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.mockito.internal.runners.DefaultInternalRunner$1$1.evaluate(DefaultInternalRunner.java:44) > at > org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258) > at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) > at > org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) > at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) > at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) > at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) > at org.junit.runners.ParentRunner.run(ParentRunner.java:413) > at > org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:74) > at > org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:80) > at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:39) > at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:163) > at > org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:53) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) > at > org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) > Tests in error: > TestAssetREST.testCountXAssets:424 » NullPointer > TestXAuditREST.Test8countXAccessAudits:208 » NullPointer > Tests run: 1049, Failures: 2, Errors: 2, Skipped: 6 > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)