You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "PDGGK (via GitHub)" <gi...@apache.org> on 2026/09/01 08:46:10 UTC
Re: [PR] Truncate timestamps towards the past when comparing them for consistency [shardingsphere]
PDGGK commented on PR #39610:
URL: https://github.com/apache/shardingsphere/pull/39610#issuecomment-5491383182
Fixed in `cb595fe5`. `assertTrue` and `assertFalse` are back and the `Matchers.is` import is gone; the scenarios are now two parameterized tests, `assertTimestampMatchedBeforeEpoch` and `assertTimestampNotMatchedBeforeEpoch`, each execution still invoking `isMatched` once.
One thing worth stating rather than leaving implicit: of the four pre-epoch scenarios, three fail on `master` and one does not. `sub second tolerance before epoch` (-1999, -1001) is already true under integer division, so it guards the tolerance rather than covering the fix. The three that discriminate are:
```
assertTimestampMatchedBeforeEpoch "same second before epoch" expected: <true> but was: <false>
assertTimestampNotMatchedBeforeEpoch "different seconds before epoch" expected: <false> but was: <true>
assertTimestampNotMatchedBeforeEpoch "different seconds across epoch" expected: <false> but was: <true>
```
The branch is also rebased onto `81da8493`, since the Spotless failure the PR was showing came from master rather than from this change.
`mvn test -pl :shardingsphere-data-pipeline-core` — 325 tests passing, `spotless:check -Pcheck` and `checkstyle:check -Pcheck` clean.
--
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