Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5676

A test in PutORCTest fails because it depends on timezone

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • Extensions
    • None

    Description

      Test testWriteORCWithAvroLogicalTypes fails because it depends on timezone. It seems that, in this test, the converted date in ORC is "1 day" before the input date when the timezone is ahead of GMT. For example, when the timezone is "GMT+9", this test fails as follows:

      [INFO] Running org.apache.nifi.processors.orc.PutORCTest
      [ERROR] Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.694 s <<< FAILURE! - in org.apache.nifi.processors.orc.PutORCTest
      [ERROR] testWriteORCWithAvroLogicalTypes(org.apache.nifi.processors.orc.PutORCTest)  Time elapsed: 0.146 s  <<< FAILURE!
      java.lang.AssertionError: expected:<17813> but was:<17812>
      	at org.apache.nifi.processors.orc.PutORCTest.lambda$testWriteORCWithAvroLogicalTypes$1(PutORCTest.java:250)
      	at org.apache.nifi.processors.orc.PutORCTest.verifyORCUsers(PutORCTest.java:408)
      	at org.apache.nifi.processors.orc.PutORCTest.testWriteORCWithAvroLogicalTypes(PutORCTest.java:246)
      

      To fix this, we can set the timezone information in the assertion as we did in NIFI-3718.

      Attachments

        Issue Links

          Activity

            People

              kotarot Kotaro Terada
              kotarot Kotaro Terada
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: