Skip to content

[hotfix][test][sqlserver] Shift test timestamps to avoid Debezium time-type conversion bug - #4548

Open
yuxiqian wants to merge 1 commit into
apache:masterfrom
yuxiqian:hotfix/flaky-ut
Open

yuxiqian wants to merge 1 commit into
apache:masterfrom
yuxiqian:hotfix/flaky-ut

Conversation

@yuxiqian

Copy link
Copy Markdown
Member

What is the purpose of this pull request?

The SQL Server connector IT tests used 2018-07-13 10:23:45 as test data. When CI runs with a random JVM timezone (e.g. GMT+11 or GMT+12), Debezium 1.9.8.Final's CDC change-log reader interprets the time value with the timezone offset, producing a negative epoch. This causes a DateTimeException (Invalid value for NanoOfSecond) and silent data loss (time values become null).

Brief change log

Shift the test date to 2000-01-01 and the time to 15:23:45 so that even with the maximum possible positive timezone offset (GMT+12), the resulting epoch remains positive and Debezium's conversion succeeds.


Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: ChatGPT (GPT-5 Codex)

…me-type conversion bug

The SQL Server connector IT tests used 10:23:45 as test data for
val_time_p2 (time(2)) and val_time (time(4)). When CI runs with a
random JVM timezone (e.g. GMT+11 or GMT+12), Debezium 1.9.8.Final's
CDC change-log reader interprets the time value with the timezone
offset, producing a negative epoch. This causes a DateTimeException
(Invalid value for NanoOfSecond) and silent data loss (time values
become null).

Shift the test time values from 10:23:45 to 15:23:45 so that even
with the maximum possible positive timezone offset (GMT+12), the
resulting epoch remains positive and Debezium's conversion succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant