You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently httpexpect.Request has 4 retry policies:
DontRetry
RetryTemporaryNetworkErrors
RetryTemporaryNetworkAndServerErrors
RetryAllErrors
RetryTemporaryNetworkErrors and RetryTemporaryNetworkAndServerErrors use net.Error.Temporary to identify temporary network errors (see Request.shouldRetry). This method were deprecated in recent go versions:
// An Error represents a network error.typeErrorinterface {
errorTimeout() bool// Is the error a timeout?// Deprecated: Temporary errors are not well-defined.// Most "temporary" errors are timeouts, and the few exceptions are surprising.// Do not use this method.Temporary() bool
}
Hence, we should migrate from Temporary to Timeout, but without breaking compatibility.
Steps:
introduce two new retry policies: RetryTimeoutErrors, RetryTimeoutAndServerErrors
RetryTimeoutErrors should work like RetryTemporaryNetworkErrors, but it should use net.Error.Timeout
RetryTimeoutAndServerErrors should work like RetryTemporaryNetworkAndServerErrors, but it should use net.Error.Timeout
mark RetryTemporaryNetworkErrors and RetryTemporaryNetworkAndServerErrors as deprecated and suggest to use corresponding new policies instead
update tests to work with new policies; exclude deprecated policies from tests because these tests are huge already
We will remove deprecated policies in v3.
The text was updated successfully, but these errors were encountered:
Currently httpexpect.Request has 4 retry policies:
RetryTemporaryNetworkErrors and RetryTemporaryNetworkAndServerErrors use net.Error.Temporary to identify temporary network errors (see Request.shouldRetry). This method were deprecated in recent go versions:
Hence, we should migrate from Temporary to Timeout, but without breaking compatibility.
Steps:
We will remove deprecated policies in v3.
The text was updated successfully, but these errors were encountered: