Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-2829: Fixed PutSQL time unit test. #2082

Closed
wants to merge 2 commits into from

Commits on Aug 14, 2017

  1. NIFI-2829: Fixed PutSQL time unit test.

    The unit test for DATE type used GMT timezone, that causes an assertion error in timezones such as EST (-5).
    We need to use local timezone instead of GMT, as Derby and PutSQL uses local timezone.
    
    The unit test failed before as follows:
    - Unit test code, passed: '2002-02-02 GMT'
    - PutSQL code convertedi it to local: '2002-02-01 EST', and stored as '2002-02-01' in Derby database without timezone info
    - Unit test code SELECT the inserted value, passed a GMT calender, then got epoch timestamp, which was '2002-01-31'
    ijokarumawak committed Aug 14, 2017
    Configuration menu
    Copy the full SHA
    5b51b4d View commit details
    Browse the repository at this point in the history
  2. Support negative long value for timezones ahead of UTC.

    - For timezones such as '+0800', it's possible that a local time e.g. '02:03:04' can be a negative epoch value. This commit changes LONG_PATTERN so that it can accept nevative values.
    - Changed time values in unit tests to verify negative epoch values, and avoid using the same digits among different time unit for better readability.
    ijokarumawak committed Aug 14, 2017
    Configuration menu
    Copy the full SHA
    0f8988e View commit details
    Browse the repository at this point in the history