-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
integration: watch cancel test #4223
Conversation
}{ | ||
// one key, one put, one watch, one cancellation | ||
{ | ||
[]*pb.PutRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make these requests one line when possible to improve readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
db95995
to
f37bc72
Compare
|
||
wcreatedN := 0 | ||
for _, wreq := range tt.wreqs { | ||
if wreq == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well... why do we want to put a nil into wreqs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set up the tests, with each put, watch request, watch response having exact the same number of elements
so that I can run each action by index and match event by index. Do you have any suggestion? I need nil
to fill
those slice. And if wreq
is nil
it doesn't send watch request.
fc9ca17
to
6982a0c
Compare
@xiang90 PTAL. Just simplified. Thanks, |
t.Fatalf("wAPI.Watch error: %v", err) | ||
} | ||
|
||
// send create WatchRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this comment.
6982a0c
to
64ffe60
Compare
@xiang90 Just fixed comments. Thanks, |
LGTM |
Test all passed. I will quickly fix the govet shadow issue in the same commit and merge after second CI passes. |
64ffe60
to
2535509
Compare
Related #4216.