[
https://issues.apache.org/jira/browse/SENTRY-1721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987589#comment-15987589
]
Na Li commented on SENTRY-1721:
-------------------------------
It seems the regression of testing is introduced in "SENTRY-1587: Refactor
SentryStore transaction to persist a single path transcation bundled with
corresponding delta path change"
The code was changed from
List<MSentryPermChange> mSentryPermChanges =
sentryStore.getMSentryPermChanges(1);
assertEquals(lastChangeID, mSentryPermChanges.size());
to
List<MSentryPermChange> mSentryPermChanges =
sentryStore.getMSentryPermChanges(initialID);
assertEquals(lastChangeID, mSentryPermChanges.size());
It should be
List<MSentryPermChange> mSentryPermChanges =
sentryStore.getMSentryPermChanges(initialID);
assertEquals(lastChangeID - initialID + 1, mSentryPermChanges.size());
The bug only shows when multiple tests are running.
> Unit test failures in TestSentryStore
> -------------------------------------
>
> Key: SENTRY-1721
> URL: https://issues.apache.org/jira/browse/SENTRY-1721
> Project: Sentry
> Issue Type: Sub-task
> Components: Sentry
> Affects Versions: sentry-ha-redesign
> Reporter: Na Li
> Assignee: Na Li
> Labels: test
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> We encounter multiple incidents of unit test failures. They are mainly
> TestSentryStore.testPrivilegesWithPermUpdate and
> TestPrivilegeOperatePersistence.testGrantPrivilegeExternalComponentInvalidConf
> These tests fail more often when HMSFollower is created after
> SentryService.Start() is called. And less frequent when HMSFollower is
> created in SentryService constructor. Need investigation on whether this is
> just a bug in test cases or reflect issues in synchronization between Sentry
> HMS metastore.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)