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

Na Li commented on SENTRY-1718:
-------------------------------

The fix can be to check in TestSentryStore.setup() if the provider already has 
the credential. If not, add it. otherwise, don't add the credential. In this 
way, we can avoid the exception. 
The question is in normal operation, will there be only one instance of user 
provider at a sentry server? So the normal operation won't have such scenario?

> TestSentryStore often fails in setup()
> --------------------------------------
>
>                 Key: SENTRY-1718
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1718
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>            Reporter: Alexander Kolbasov
>            Assignee: Na Li
>             Fix For: sentry-ha-redesign
>
>
> Recent builds of sentry ha often fail with failures similar to this:
> {code}
> Running org.apache.sentry.provider.db.service.persistent.TestSentryStore
> Tests run: 58, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 43.213 sec 
> <<< FAILURE! - in 
> org.apache.sentry.provider.db.service.persistent.TestSentryStore
> testPrivilegesWithPermUpdate(org.apache.sentry.provider.db.service.persistent.TestSentryStore)
>   Time elapsed: 0.195 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<2012> but was:<2>
>         at 
> org.apache.sentry.provider.db.service.persistent.TestSentryStore.testPrivilegesWithPermUpdate(TestSentryStore.java:2707)
> org.apache.sentry.provider.db.service.persistent.TestSentryStore  Time 
> elapsed: 0.14 sec  <<< ERROR!
> java.io.IOException: Credential sentry.store.jdbc.password already exists in 
> user:///
>         at 
> org.apache.sentry.provider.db.service.persistent.TestSentryStore.setup(TestSentryStore.java:97)
> {code}



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

Reply via email to