Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8602

locatorsStopWaitingForLocatorWaitTimeIfAllLocatorsContacted fails because test doesn't wait for view to have all members

    XMLWordPrintableJSON

Details

    Description

      MembershipIntegrationTest.locatorsStopWaitingForLocatorWaitTimeIfAllLocatorsContacted() correctly waits for locators to start but then fails to wait for locators' views to be updated.

      This code:

          assertThat(membership0.getView().getMembers()).hasSize(2);
      

      …doesn't wait. This results in an exception sometimes:

      org.apache.geode.distributed.internal.membership.gms.MembershipIntegrationTest > locatorsStopWaitingForLocatorWaitTimeIfAllLocatorsContacted FAILED
          java.lang.AssertionError: 
          Expected size:<2> but was:<1> in:
          <[172.17.0.30(1:locator)<ec><v0>:41000]>
              at org.apache.geode.distributed.internal.membership.gms.MembershipIntegrationTest.locatorsStopWaitingForLocatorWaitTimeIfAllLocatorsContacted(MembershipIntegrationTest.java:308)
      

      A Band-Aid would be to put an awaitility call around the two such hasSize() calls. A better fix would be to make the test deterministic per GEODE-8589.

      Attachments

        Issue Links

          Activity

            People

              upthewaterspout Dan Smith
              burcham Bill Burcham
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: