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

MetadataSubscriberServiceTest is flaky

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.0
    • Component/s: Metadata, Test
    • Labels:
    • Rank:
      1|i00l9z:

      Description

      At the beginning, the test case validates that no lineage has been written:

      // Try to read lineage, which should be empty since we haven't start the MetadataSubscriberService yet.
      Set<NamespacedEntityId> entities = lineageReader.getEntitiesForRun(run1);
      Assert.assertTrue(entities.isEmpty()); 

      But this assumption is not true, because since CDAP-14587, ApFabricTestBase starts the subscriber. Therefore it can happen that lineage has already been written and the test fails 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.metadata.MetadataSubscriberServiceTest.testSubscriber(MetadataSubscriberServiceTest.java:129)

      This assertion should be (re)moved.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                andreas Andreas Neumann
                Reporter:
                andreas Andreas Neumann
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: