Harden TestClientWithRequestTimeout#39168
Merged
crosbymichael merged 1 commit intomoby:masterfrom Jul 12, 2019
Merged
Conversation
f96f9dc to
0fdcb85
Compare
Codecov Report
@@ Coverage Diff @@
## master #39168 +/- ##
=========================================
Coverage ? 37.01%
=========================================
Files ? 612
Lines ? 45655
Branches ? 0
=========================================
Hits ? 16898
Misses ? 26468
Partials ? 2289 |
Member
Author
|
@jhowardmsft @cpuguy83 ptal |
cpuguy83
reviewed
May 6, 2019
pkg/plugins/client_test.go
Outdated
Member
There was a problem hiding this comment.
Why not do something like, define the error interface locally:
type timeoutError interface {
Timeout() bool
}And type check against that?
Member
|
Ping |
0fdcb85 to
35fd1e1
Compare
Member
Author
|
@cpuguy83 Updated; hope this is what you meant 🤗 |
Member
|
Not quite, I was thinking a single assertion to a timeout error since they all should implement that. |
Member
Author
|
Ahm, right. I wasn't sure if it was part of the contract for these errors (I saw the |
35fd1e1 to
0b1fbdd
Compare
DeadlineExceeded now implements a TimeOut() function, since golang/go@dc4427f Check for this interface, to prevent possibly incorrect failures; ``` 00:16:41 --- FAIL: TestClientWithRequestTimeout (0.00s) 00:16:41 client_test.go:259: assertion failed: 00:16:41 --- context.DeadlineExceeded 00:16:41 +++ err 00:16:41 : 00:16:41 -: context.deadlineExceededError{} 00:16:41 +: &net.OpError{Op: "dial", Net: "tcp", Addr: s"127.0.0.1:49294", Err: &poll.TimeoutError{}} 00:16:41 ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
0b1fbdd to
c7816c5
Compare
Member
Author
|
Test passed; |
Contributor
|
LGTM |
This was referenced Aug 9, 2019
This was referenced Oct 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
splitting this off from #39100 per discussion on #39100 (comment)
addresses #38587 (first reported failure)
DeadlineExceeded now implements a TimeOut() function,
since golang/go@dc4427f
Check for this as well, to prevent possibly incorrect failures;
- How to verify it