Skip to content

Commit

Permalink
[UT] Fix unstable fe ut
Browse files Browse the repository at this point in the history
Signed-off-by: meegoo <[email protected]>
  • Loading branch information
meegoo committed Nov 22, 2024
1 parent 32615c5 commit 037c643
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public void testNextGtidIncrementsSequenceOnSameMillisecond() {
long secondGtid = gtidGenerator.nextGtid();

Assertions.assertNotEquals(firstGtid, secondGtid, "GTIDs should be unique");
Assertions.assertEquals((firstGtid & GtidGenerator.MAX_SEQUENCE) + 1, secondGtid & GtidGenerator.MAX_SEQUENCE,
"Sequence should increment by 1 on the same millisecond");
if (firstGtid >> GtidGenerator.TIMESTAMP_SHIFT == secondGtid >> GtidGenerator.TIMESTAMP_SHIFT) {
Assertions.assertEquals((firstGtid & GtidGenerator.MAX_SEQUENCE) + 1, secondGtid & GtidGenerator.MAX_SEQUENCE,
"Sequence should increment by 1 on the same millisecond");
}
}

@Test
Expand Down

0 comments on commit 037c643

Please sign in to comment.