Closed malud closed 9 months ago
If I change the paths
to
paths := []string{
"/named",
"/named",
"/named",
"/named",
}
(which doesn't have default request/proxy), TestBackend_MaxConnections_BodyClose passes 10/10.
If I change it to
paths := []string{
"/",
"/",
"/",
"/",
}
(which has default request), TestBackend_MaxConnections_BodyClose fails 8/10.
So I guess, this is related to the changes to the handling of default requests/proxies in this PR.
In Backend.innerRoundTrip(), all backend requests are passed to
beresp, err := b.transport.RoundTrip(req)
but at least some get a "context canceled"
error.
The test started to fail with commit "Fix buffer condition and related body parse in combination with syncedVariables provided by each backend instance", then passed with commit "Fix random order related to the default block while preparing roundtrips" and failed again with commit "reduce produce wait-time; TODO".
Apparently, the
time.Sleep(time.Nanosecond * 10) // TODO: refactor to ch pipe
is not stable enought. The previous
time.Sleep(time.Millisecond * 5) // TODO: refactor to ch pipe
was more stable.
closes https://github.com/coupergateway/couper/issues/766
Reviewer checklist