[
https://issues.apache.org/jira/browse/SENTRY-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988252#comment-15988252
]
Alexander Kolbasov commented on SENTRY-1718:
--------------------------------------------
[[email protected]] Can you, pease, clarify your analysis a bit:
1)
{code}
@BeforeClass
public static void setup() throws Exception {
final String ourUrl = UserProvider.SCHEME_NAME + ":///";
conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, ourUrl);
CredentialProvider provider =
CredentialProviderFactory.getProviders(conf).get(0);
provider.createCredentialEntry(ServerConfig.
SENTRY_STORE_JDBC_PASS, passwd);
provider.flush();
{code}
The provider itself is a local variable. You are saying that it creates static
state somewhere - can you point to the code that does this?
2) Why is the failure non-deterministic and doesn't happen all the time?
3) hy did this failure appeared recently and we didn't see it before? Did some
of the recent code changes triggered it?
> 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
> Affects Versions: sentry-ha-redesign
> Reporter: Alexander Kolbasov
> Assignee: Na Li
> Fix For: sentry-ha-redesign
>
> Attachments: SENTRY-1718.001-sentry-ha-redesign.patch,
> SENTRY-1718.001-sentry-ha-redesign.patch,
> SENTRY-1718.002-sentry-ha-redesign.patch
>
>
> 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)