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

Masatake Iwasaki commented on HADOOP-12588:
-------------------------------------------

The first patch and addendum was based on wrong assumption.. Sorry about that.

We need to make sure that {{MockDatagramSocket#getCapturedSend}} in test thread 
happens after the last call of {{MockDatagramSocket#send}} in sink thread. 
Given the synchronization between {{MetricsSystemImpl#publishMetricsNow}} and 
{{MetricsSink#putMetrics}}, making the {{getCapturedSend}} and {{send}} should 
be sufficient.

Replacing {{ArrayList}} with {{CopyOnWriteArrayList}} is unnecessary and 
misleading. It should be reverted in the next patch.


> Fix intermittent test failure of TestGangliaMetrics
> ---------------------------------------------------
>
>                 Key: HADOOP-12588
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12588
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Tsuyoshi Ozawa
>            Assignee: Masatake Iwasaki
>             Fix For: 2.8.0, 2.7.3
>
>         Attachments: HADOOP-12588.001.patch, HADOOP-12588.addendum.patch
>
>
> Jenkins found this test failure on HADOOP-11149.
> {quote}
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.773 sec <<< 
> FAILURE! - in org.apache.hadoop.metrics2.impl.TestGangliaMetrics
> testGangliaMetrics2(org.apache.hadoop.metrics2.impl.TestGangliaMetrics)  Time 
> elapsed: 0.39 sec  <<< FAILURE!
> java.lang.AssertionError: Missing metrics: test.s1rec.Xxx
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at 
> org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:159)
>       at 
> org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:137)
> {quote}



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

Reply via email to