wnob commented on code in PR #209:
URL: https://github.com/apache/calcite-avatica/pull/209#discussion_r1110447361


##########
core/src/test/java/org/apache/calcite/avatica/util/TimeAccessorTest.java:
##########
@@ -46,77 +49,74 @@ public class TimeAccessorTest {
    */
   @Before public void before() {
     final AbstractCursor.Getter getter = new LocalGetter();
-    localCalendar = Calendar.getInstance(TimeZone.getDefault(), Locale.ROOT);
-    instance = new AbstractCursor.TimeAccessor(getter, localCalendar);
+    localCalendar = Calendar.getInstance(IST_ZONE, Locale.ROOT);
+    instance = new AbstractCursor.TimeAccessor(getter, localCalendar, false);
   }
 
   /**
-   * Test {@code getTime()} returns the same value as the input time for the 
local calendar.
+   * Test {@code getTime()} returns the same value as the input time for the 
connection default
+   * calendar.

Review Comment:
   This was just me trying to reconcile the test description with the logic 
therein, though I realize now that I didn't do a great job of it. The test says 
"for the local calendar", but it's unclear if that means `localCalendar` (which 
is not involved in this test at all), or UTC (which in most cases would not be 
accurately described as "the local calendar"). Upon closer inspection I can 
appreciate that this test case is really meant to test that no adjustment 
occurs when the explicitly provided calendar is either UTC or null. I'm working 
to clean up these tests in general, and in this case I think the I should've 
just updated the javadoc.



-- 
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