mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 02:06:23 +00:00
Merge pull request #137482 from aman4433/fix-apf-timeout-header-test-race
apiserver: tolerate APF header race with timeout handler in priority-and-fairness tests
This commit is contained in:
@@ -1210,6 +1210,13 @@ func (m *headerMatcher) inspect(t *testing.T, w http.ResponseWriter, ctx context
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
// The timeout filter may have already committed the response
|
||||
// before APF had a chance to attach its headers.
|
||||
if ctx.Err() != nil {
|
||||
t.Logf("Skipping APF header assertion for %s: response committed after timeout", key)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
t.Errorf("expected HTTP header %s to have value %q, but got: %q", key, expected, actual)
|
||||
|
||||
Reference in New Issue
Block a user