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

Refactor net.Error.Temporary #2149

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

demonCoder95
Copy link
Member

Provides a fix for #1992.

@demonCoder95
Copy link
Member Author

Temporary based tests were also dropped as no longer relevant.

@demonCoder95
Copy link
Member Author

I'll add unit tests for Timeout().

@demonCoder95
Copy link
Member Author

I refactored the temporary error tests for timeout error and it seems the tests were broken. Any ideas on how to fix that? Also, I'll take a look at some production logs, as suggested on the linked issue to check for appropriate error strings.

func (err testError) Timeout() bool { return false }
func (err testError) Temporary() bool { return true }
func (err testError) Error() string { return "test error" }
func (err testError) Timeout() bool { return false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the tests are waiting for Timeout() returning true?
I see that you wait for some log message but maybe it's the condition that is now different, because Temporary was "true" and Timeout is "false"

@demonCoder95 demonCoder95 self-assigned this Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants