-
Notifications
You must be signed in to change notification settings - Fork 12
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
Calculate zoneOffset
based on zoneId
in TestActorRequestFactory
#915
Conversation
Codecov Report
@@ Coverage Diff @@
## master #915 +/- ##
============================================
+ Coverage 93.38% 93.38% +<.01%
- Complexity 3868 3869 +1
============================================
Files 529 529
Lines 12629 12637 +8
Branches 703 703
============================================
+ Hits 11793 11801 +8
Misses 607 607
Partials 229 229 |
@dmdashenkov, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serhii-lekariev, LGTM with a single comment to address.
@@ -98,6 +100,19 @@ public static TestActorRequestFactory newInstance(Class<?> testClass, TenantId t | |||
ZoneIds.systemDefault()); | |||
} | |||
|
|||
private static ZoneOffset idToZoneOffset(ZoneId zoneId) { | |||
String id = zoneId.getValue(); | |||
java.time.ZoneId javaZoneId = java.time.ZoneId.of(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please inline the zoneId.getValue()
call. The id
variable doesn't make the code more readable, since "ID" is too broad of a term.
…nto calculate-zone-offset-from-id
This PR addresses #885.
Before, to create an instance of
TestActorRequestFactory
, two timezone-related parameters were needed:zone ID and zone offset.
Since it is possible to calculate offset based on ID, two parameters have been substituted with a single one - zone ID. Zone offset is now calculated based on the ID.