Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6911

variables_refreshed_each_compilation test can fail uptime comparisons

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.7.1, PUP 4.8.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Systems Engineering
    • Story Points:
      1
    • Sprint:
      SE 2016-11-16
    • Release Notes:
      Not Needed

      Description

      The variables_refreshed_each_compilation acceptance test can fail when the uptime seconds that the test is comparing happen are for strings where the earlier uptime is lexicographically later than the later uptime. For example, this test failed in the puppetserver pipeline here with the following console output:

       
      jubzk4qxrpdh8r2.delivery.puppetlabs.net (ubuntu1604-32-2) 03:09:15$ puppet agent -t --server ks6npbjxt60nblz.delivery.puppetlabs.net --environment variables_refreshed_each_compilation_nmjw1l2b
      ...
              Notice: local_9999_local
       
      jubzk4qxrpdh8r2.delivery.puppetlabs.net (ubuntu1604-32-2) 03:09:19$ puppet agent -t --server ks6npbjxt60nblz.delivery.puppetlabs.net --environment variables_refreshed_each_compilation_nmjw1l2b
      ...
              Notice: local_10002_local
       
      Warning: 
            uptime did not change
      

      The assertions are made from here. The values of the variables being compared are strings. In this case though a string value of "9999" would be lexicographically greater than a string value of "10002", so the test fails. The test should be changed to do numeric comparisons of the uptimes in order to avoid the problem.

        Attachments

          Activity

            People

            • Assignee:
              jeremy.barlow Jeremy Barlow
              Reporter:
              jeremy.barlow Jeremy Barlow
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support