mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04: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:
commit
36925dc0c7
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue