flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kl0u edited a comment on issue #6492: [FLINK-9962] [FS connector] allow users to specify TimeZone in DateTimeBucketer
Date Tue, 21 Aug 2018 09:19:48 GMT
kl0u edited a comment on issue #6492: [FLINK-9962] [FS connector] allow users to specify TimeZone
in DateTimeBucketer
URL: https://github.com/apache/flink/pull/6492#issuecomment-414608532
 
 
   Hi @bowenli86 ! I am in the process of reviewing the PR.
   
   There is no need to mock `ZoneId.systemDefault()`. 
   We have a constructor where we can specify the the `ZoneId`, so why not using this in order
to provide a `ZoneId`?  This means that the `testGetBucketPathWithDefaultTimezone` will become:
   
   ```
   @Test
   public void testGetBucketPathWithDefaultTimezone() {
   	ZoneId utc = ZoneId.of("UTC");
   	DateTimeBucketAssigner bucketAssigner = new DateTimeBucketAssigner(utc);
   	assertEquals("2018-08-04--06", bucketAssigner.getBucketId(null, mockedContext));
   }
   ``` 
   
   What do you think?
   
   And now that I see the tests, we do not even need that test, as we also have the  `testGetBucketPathWithSpecifiedTimezone`
;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message