Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18564

Extend test coverage for WatchListener in DistributionZoneManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      Motivation

      DistributionZoneManagerWatchListenerTest checks only default zone. Now when individual zone change trigger were created it is possible to test custom zones too. So need to add a custom zone to all tests in DistributionZoneManagerWatchListenerTest.

      DistributionZoneManager has a watch listener which is triggered on update "distributionZones.logicalTopology" key and updates zone dataNodes in the metastorage. Also DistributionZoneManager has a method initDataNodesFromVaultManager() which save zone dataNodes on DistributionZoneManager#start(). DistributionZoneManagerWatchListenerTest checks this logic. But it checks only for default zone. Now when individual zone change trigger keys were created it is possible to test custom zones too. So need to add a custom zone to all tests in DistributionZoneManagerWatchListenerTest.

      1. testDataNodesOfDefaultZoneUpdatedOnWatchListenerEvent - the test checks that dataNodes is updated on watch event. Need to add custom zone and check it.
      2. testStaleWatchEvent - the test checks that dataNodes is not updated on stale watch event. Need to add custom zone and check it.
      3. testStaleVaultRevisionOnZoneManagerStart - the test checks that dataNodes is not updated from the vault on DistributionZoneManager#start() if the vault applied revision is stale. Need to add custom zone and check it.
      4. testDataNodesUpdatedOnZoneManagerStart - the test checks that dataNodes is updated from the vault on DistributionZoneManager#start(). Need to add custom zone and check it.
      5. testLogicalTopologyIsNullOnZoneManagerStart - the test checks that dataNodes is not updated from the vault on DistributionZoneManager#start() if "distributionZones.logicalTopology" is null in the vault. Need to add custom zone and check it.

      Definition of Done

      Tests in the DistributionZoneManagerWatchListenerTest check not only default zone, but also a custom zone.

      Attachments

        Issue Links

          Activity

            People

              Sergey Uttsel Sergey Uttsel
              Sergey Uttsel Sergey Uttsel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: