fix: deflake TestCRIImagePullTimeout/HoldingContentOpenWriter
The new active request is filed and there is no bytes read yet when the progress reporter just wakes up. If the timeout / 2 is less than the minPullProgressReportInternal, it's easy to file false alert. We should remove the minPullProgressReportInternal limit. Fixes: #8024 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
349c8d12c8
commit
2e9686c054
@ -555,9 +555,6 @@ func newTransport() *http.Transport {
|
||||
//}
|
||||
|
||||
const (
|
||||
// minPullProgressReportInternal is used to prevent the reporter from
|
||||
// eating more CPU resources
|
||||
minPullProgressReportInternal = 5 * time.Second
|
||||
// defaultPullProgressReportInterval represents that how often the
|
||||
// reporter checks that pull progress.
|
||||
defaultPullProgressReportInterval = 10 * time.Second
|
||||
@ -605,10 +602,6 @@ func (reporter *pullProgressReporter) start(ctx context.Context) {
|
||||
// check progress more frequently if timeout < default internal
|
||||
if reporter.timeout < reportInterval {
|
||||
reportInterval = reporter.timeout / 2
|
||||
|
||||
if reportInterval < minPullProgressReportInternal {
|
||||
reportInterval = minPullProgressReportInternal
|
||||
}
|
||||
}
|
||||
|
||||
var ticker = time.NewTicker(reportInterval)
|
||||
|
Loading…
Reference in New Issue
Block a user