Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: gengjun-git <[email protected]>
  • Loading branch information
gengjun-git committed Dec 19, 2024
1 parent bcffa32 commit bec7723
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void testCheckpointCache() throws ExecutionException {
.expireAfterWrite(3600, TimeUnit.SECONDS)
.weigher((key, value) ->
Math.toIntExact(SizeEstimator.estimate(key) + SizeEstimator.estimate(value)))
.maximumWeight(1024 * 2)
.maximumWeight(400 * 2)
.concurrencyLevel(1)
.build(new CacheLoader<>() {
@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,9 @@ public void testNowWithParameter() throws AnalysisException {
ConnectContext ctx = new ConnectContext(null);
ctx.setThreadLocalInfo();
ctx.setStartTime();
LocalDateTime expected = ctx.getStartTimeInstant().atZone(TimeUtils.getTimeZone().toZoneId()).toLocalDateTime();
Instant instant = ctx.getStartTimeInstant();
LocalDateTime expected = Instant.ofEpochSecond(instant.getEpochSecond(), instant.getNano() / 1000 * 1000)
.atZone(TimeUtils.getTimeZone().toZoneId()).toLocalDateTime();
assertEquals(expected, ScalarOperatorFunctions.now(new ConstantOperator(6, Type.INT)).getDatetime());
}

Expand Down

0 comments on commit bec7723

Please sign in to comment.