mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Fix flaky legacy pod autoscaler test
The reactor in runTest is set to catch all actions, but eventually it only handles CreateAction without checking action type which might fail sometimes when Patch arrives. This fix ensures we handle only the CreateAction.
This commit is contained in:
parent
84b561033e
commit
bcfd48c29e
@ -472,7 +472,11 @@ func (tc *legacyTestCase) runTest(t *testing.T) {
|
||||
if tc.finished {
|
||||
return true, &v1.Event{}, nil
|
||||
}
|
||||
obj := action.(core.CreateAction).GetObject().(*v1.Event)
|
||||
create, ok := action.(core.CreateAction)
|
||||
if !ok {
|
||||
return false, nil, nil
|
||||
}
|
||||
obj := create.GetObject().(*v1.Event)
|
||||
if tc.verifyEvents {
|
||||
switch obj.Reason {
|
||||
case "SuccessfulRescale":
|
||||
|
Loading…
Reference in New Issue
Block a user