Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: use revision for watch test #6205

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/tso/tso.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (t *timestampOracle) isInitialized() bool {

// resetUserTimestamp update the TSO in memory with specified TSO by an atomically way.
// When ignoreSmaller is true, resetUserTimestamp will ignore the smaller tso resetting error and do nothing.
// It's used to write MaxTS during the Global TSO synchronization whitout failing the writing as much as possible.
// It's used to write MaxTS during the Global TSO synchronization without failing the writing as much as possible.
// cannot set timestamp to one which >= current + maxResetTSGap
func (t *timestampOracle) resetUserTimestamp(leadership *election.Leadership, tso uint64, ignoreSmaller bool) error {
return t.resetUserTimestampInner(leadership, tso, ignoreSmaller, false)
Expand Down
5 changes: 4 additions & 1 deletion tests/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,10 @@ func TestWatch(t *testing.T) {
defer client.Close()

key := "test"
ch, err := client.Watch(ctx, []byte(key))
resp, err := client.Get(ctx, []byte(key))
re.NoError(err)
rev := resp.GetHeader().GetRevision()
ch, err := client.Watch(ctx, []byte(key), pd.WithRev(rev))
re.NoError(err)
exit := make(chan struct{})
go func() {
Expand Down