Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-13609

MessagingMetricsProcessorServiceTest is flaky

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0
    • Component/s: Test
    • Labels:
    • Rank:
      1|i00drj:

      Description

      As seen in https://builds.cask.co/browse/CDAP-BUT-1341
      MessagingMetricsProcessorServiceTest#persistMetricsTests failed with

      java.lang.AssertionError
      	at org.junit.Assert.fail(Assert.java:86)
      	at org.junit.Assert.assertTrue(Assert.java:41)
      	at org.junit.Assert.assertTrue(Assert.java:52)
      	at co.cask.cdap.metrics.process.MessagingMetricsProcessorServiceTest.persistMetricsTests(MessagingMetricsProcessorServiceTest.java:107)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      (41 more lines...)
      

      This is because in MessagingMetricsProcessorService, before persisting the metrics and topic metas, a copy of the topic metas containing the metrics processor delay metrics is made before making a copy of metric values. Therefore, there can be a very small chance where all metric values are persisted but the corresponding metric metas are not yet persisted.

        Attachments

          Activity

            People

            • Assignee:
              shankar Shankar Selvam
              Reporter:
              mao Chengfeng Mao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: