fix: unstable timeticksync unittest (#41437)

issue: #38399

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-04-22 10:53:29 +08:00 committed by GitHub
parent 9339bccccc
commit 7f5a9a6046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ func TestTimeTickSyncOperator(t *testing.T) {
assert.ErrorIs(t, err, context.DeadlineExceeded) assert.ErrorIs(t, err, context.DeadlineExceeded)
assert.Nil(t, r) assert.Nil(t, r)
// should not trigger any wal operation, but only update the timetick. // should not trigger any wal operation, but only update the timetick.
operator.Sync(ctx, false) operator.Sync(context.Background(), false)
r, err = wb.ReadFromExclusiveTimeTick(context.Background(), newTs) r, err = wb.ReadFromExclusiveTimeTick(context.Background(), newTs)
assert.NoError(t, err) assert.NoError(t, err)
// should not block because timetick updates. // should not block because timetick updates.
@ -87,5 +87,5 @@ func TestTimeTickSyncOperator(t *testing.T) {
TimeTick: mm.TimeTick(), TimeTick: mm.TimeTick(),
}, nil }, nil
}) })
operator.Sync(ctx, true) operator.Sync(context.Background(), true)
} }