-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add sub-context to enable cancellation of checks #61
Conversation
@@ -151,7 +151,7 @@ func TestHTTPSuccessBodyMatch(t *testing.T) { | |||
"target_resolver":"", | |||
"disabled":false | |||
}`, ts.URL) | |||
check := check.NewCheck([]byte(checkData)) | |||
check := check.NewCheck([]byte(checkData), context.Background(), func() {}) |
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.
can we pass a nil instead of func() {}
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 worried that even though nothing in our tests currently call Check.Cancel()
...a later code change might
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.
ah ok
@goru97, @tpboudreau , @GeorgeJahad I was looking at the session go-loops and speculated this change might help for check commit/update logic. Feel free to chop it up or rip it out later if not applicable.