[ 
https://issues.apache.org/jira/browse/HADOOP-13395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiao Chen updated HADOOP-13395:
-------------------------------
    Attachment: HADOOP-13395.02.patch

Patch 2 fixes checkstyle warnings (except the >80 chars ones, which in this 
test I think is better to read).

Fixed the flaky {{testAggregationUnauth}}:
{{KMSAudit}} utilizes a removal listener to aggregate the same logs ({{OK}} 
ones in the test), and an {{UNAUTHORIZED}} log will invalidate the aggregation 
cache. Whether the {{UNAUTHORIZED}} entry or the aggregated {{OK}} log appear 
first solely depend on the run time -  after {{cache.invalidate(cacheKey)}}, 
whether the {{AUDIT_LOG.info}} executes first, or the removal listener's log 
executes first.

Fixed the unit test by verifying either scenario happened. The goal of the test 
is to check aggregation stops after {{UNAUTHORIZED}}, which is checked via the 
last {{OK}} message.

> Enhance TestKMSAudit
> --------------------
>
>                 Key: HADOOP-13395
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13395
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: kms
>    Affects Versions: 2.6.0
>            Reporter: Xiao Chen
>            Assignee: Xiao Chen
>            Priority: Minor
>         Attachments: HADOOP-13395.01.patch, HADOOP-13395.02.patch
>
>
> This jira serves the goals:
> - Enhance existing test cases in TestKMSAudit, to rule out flakiness.
> - Add a new test case about formatting for different events.
> This will help us ensure audit log compatibility when we add a new log format 
> to KMS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to