[
https://issues.apache.org/jira/browse/FLINK-31880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17929393#comment-17929393
]
Kurt Ostfeld commented on FLINK-31880:
--------------------------------------
[~dsaisharath] One of the project leads said that since this test is stable in
the CI system there was no point in fixing it. This test will fail in other
timezones as-is. I would fix it, as there is no downside, but that's for the
team to decide.
> Bad Test in OrcColumnarRowSplitReaderTest
> -----------------------------------------
>
> Key: FLINK-31880
> URL: https://issues.apache.org/jira/browse/FLINK-31880
> Project: Flink
> Issue Type: Bug
> Components: Connectors / ORC, Formats (JSON, Avro, Parquet, ORC,
> SequenceFile)
> Reporter: Kurt Ostfeld
> Priority: Minor
> Labels: pull-request-available
>
> This is a development issue with, what looks like a buggy unit test.
>
> I tried to build Flink with a clean copy of the repository and I get:
>
> ```
> [INFO] Results:
> [INFO]
> [ERROR] Failures:
> [ERROR] OrcColumnarRowSplitReaderTest.testReadFileWithTypes:365
> expected: "1969-12-31"
> but was: "1970-01-01"
> [INFO]
> [ERROR] Tests run: 26, Failures: 1, Errors: 0, Skipped: 0
> ```
>
> I see the test is testing Date data types with `new Date(562423)` which is 9
> minutes and 22 seconds after the epoch time, which is 1970-01-01 UTC time, or
> when I run that on my laptop in CST timezone, I get `Wed Dec 31 18:09:22 CST
> 1969`.
>
> I have a simple pull request ready which fixes this issue and uses the Java 8
> LocalDate API instead which avoids time zones entirely.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)