Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-764

DST bug in metron-profiler-client Unit Tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Critical
    • Resolution: Done
    • None
    • 0.4.0
    • None

    Description

      There is a Daylight Savings Time bug in the Unit Tests for metron-profiler-client. Here's how to repro:

      • On a Mac, during daytime, clone Metron and build master branch, including unit tests to confirm they work okay:
        • mvn clean install
      • Now go into System Preferences, select "Date & Time", select left-most tab (also labeled "Date & Time"), and click the lock icon in the lower left to unlock the time settings.
      • Deselect the "set automatically" checkbox, then set the time and date to approximately 12:15AM on 3/14/2017, your local timezone.
      • Click save and lock.
      • Now run the unit tests just for metron-profiler-client:
        • mvn install -rf :metron-profiler-client
      • They fail with:
        Failed tests: 
          WindowProcessorTest.testRepeatWithWeekdayExclusion:212 expected:<2> but was:<1>
          WindowProcessorTest.testRepeatWithWeekendExclusion:175 expected:<5> but was:<6>
        Tests run: 41, Failures: 2, Errors: 0, Skipped: 0
        
      • Reverse the clock settings to get back to actual time with automatic settings.
      • Run "mvn install -rf :metron-profiler-client" again and it passes.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mattf Matthew Foley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: