You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/08/25 06:20:16 UTC

[GitHub] [shardingsphere] linghengqian commented on a diff in pull request #20255: Update IntervalShardingAlgorithm.java

linghengqian commented on code in PR #20255:
URL: https://github.com/apache/shardingsphere/pull/20255#discussion_r954543993


##########
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/IntervalShardingAlgorithmTest.java:
##########
@@ -448,4 +448,12 @@ public void assertIntegerInJDBCType() {
                 new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.closed("04", "10")));
         assertThat(actualAsMonthString.size(), is(4));
     }
+    
+    @Test
+    public void assertDateInSqlDate() {
+        Collection<String> actualAsLocalDate = shardingAlgorithmByJDBCDate.doSharding(availableTablesForJDBCDateDataSources,
+                new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO,
+                        Range.closed(new Date(2021 - 1900, 6 - 1, 15), new Date(2021 - 1900, 7 - 1, 31))));

Review Comment:
   Why use a constructor that was deprecated in JDK8?  This breaks CI for JDK18.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org