[ 
https://issues.apache.org/jira/browse/HAWQ-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945986#comment-15945986
 ] 

Alexander Denissov commented on HAWQ-1419:
------------------------------------------

The issue seems to be due to race condition on the order of tests being run -- 
when the test in question runs first (it happens to be lexicographically first 
in the list of tests), then it succeeds, if it is not first, then it fails. The 
root cause is the use of static singleton for the class under test 
"RangerHawqAuthorizer" -- once instantiated, the singleton persists for the 
duration of all other test cases, while the given test case checks 
initialization of the underlying plugin with alternative parameter.

The simplest fix would be to isolate this test to its own JVM. In fact, since 
there are just a few test cases, here, each can run in a separate JVM.

> RPS test RangerHawqAuthorizerServiceNameTest fails sometimes
> ------------------------------------------------------------
>
>                 Key: HAWQ-1419
>                 URL: https://issues.apache.org/jira/browse/HAWQ-1419
>             Project: Apache HAWQ
>          Issue Type: Sub-task
>          Components: Security
>            Reporter: Alexander Denissov
>            Assignee: Alexander Denissov
>             Fix For: backlog
>
>
> Sometimes (especially on centos7) the test fails:
> Running 
> org.apache.hawq.ranger.authorization.RangerHawqAuthorizerServiceNameTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec <<< 
> FAILURE!
> testServiceNameIsSet(org.apache.hawq.ranger.authorization.RangerHawqAuthorizerServiceNameTest)
>   Time elapsed: 0.003 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<instance> but was:<null>
>       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.junit.Assert.assertEquals(Assert.java:144)
>       at 
> org.apache.hawq.ranger.authorization.RangerHawqAuthorizerServiceNameTest.testServiceNameIsSet(RangerHawqAuthorizerServiceNameTest.java:32)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to