Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-11044

TestApplicationLimits.testLimitsComputation() has some ineffective asserts

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      TestApplicationLimits.testLimitsComputation() has the following two asserts:

          // should default to global setting if per queue setting not set
      assertEquals((long)CapacitySchedulerConfiguration.DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT,
              (long)csConf.getMaximumApplicationMasterResourcePerQueuePercent(
                  queue.getQueuePath()));
      

      and

          assertEquals((long) 0.5,
              (long) csConf.getMaximumApplicationMasterResourcePerQueuePercent(
                queue.getQueuePath()));
      

      In the current form neither of them make too much sense because getMaximumApplicationMasterResourcePerQueuePercent returns a float (between 0 and 1.0), so the only way this will fail is when the configuration is below 0 or above 1, but we're not testing invalid configurations here. This should be corrected.

      Attachments

        Issue Links

          Activity

            People

              bteke Benjamin Teke
              bteke Benjamin Teke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m