Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14836

Fix UtilsTest#testToLogDateTimeFormat failure in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0, 3.4.1
    • None
    • None

    Description

       

      org.apache.kafka.common.utils.UtilsTest.testToLogDateTimeFormat 

      test is failing in some cases. It uses hard coded datetime (2020-11-09 12:34:05), while the assertation expected part contains the offset of the current time (Instant.now()). This can lead to problems if there is a summer and winter time for the specific location. We should use the same datetime in the offset query instead of the current time.

      org.opentest4j.AssertionFailedError: expected: <2020-11-09 12:34:05,123 -07:00> but was: <2020-11-09 12:34:05,123 -08:00>

       

      Attachments

        Activity

          People

            egyed.t Tamas Barnabas Egyed
            egyed.t Tamas Barnabas Egyed
            Viktor Somogyi-Vass Viktor Somogyi-Vass
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: