exceptionfactory commented on PR #7537:
URL: https://github.com/apache/nifi/pull/7537#issuecomment-1662802081

   > > @ChrisSamo632 Sorry by accident closed this PR and the reopened. Would 
it be okay to fix the test errors by placing in `setUpBeforeClass`
   > > `TimeZone.setDefault(TimeZone.getTimeZone("UTC"));` ?
   > 
   > I'm not sure this sounds like the right way to fix this - the Checks run 
against multiple timezones for good reason, we want to be sure that processors 
can handle changes in locale. Having to set the tests to use a specific 
timezone to pass, seems like we might be hiding a potential issue either in the 
tests or the processor code itself.
   > 
   > Unfortunately, handling multiple timezones isn't my strong suite, although 
I'll try to take a look. I wonder whether @exceptionfactory or @markap14 might 
be able to provide some guidance on this one?
   
   I will try to take a closer look at the tests soon, but I agree, changing 
the default timezone in test setup code is not the right approach.
   
   All of the automated builds run with different timezones to ensure expected 
behavior in various locations, so all tests must pass without changing the 
system timezone.
   
   In general, the issue means that there is some timezone conversion 
happening, which could point to a runtime issue, or simply an issue with the 
sample data used for testing. I'm not sure exactly why this has not surfaced 
earlier, so it points to an issue with the test-related changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to