Skip to content

Commit deb48e3

Browse files
authored
Merge pull request kubernetes#76189 from soltysh/fix_legacy_podautoscaler
Fix flaky legacy pod autoscaler test
2 parents 1cdb4c9 + bcfd48c commit deb48e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/controller/podautoscaler/legacy_horizontal_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,11 @@ func (tc *legacyTestCase) runTest(t *testing.T) {
472472
if tc.finished {
473473
return true, &v1.Event{}, nil
474474
}
475-
obj := action.(core.CreateAction).GetObject().(*v1.Event)
475+
create, ok := action.(core.CreateAction)
476+
if !ok {
477+
return false, nil, nil
478+
}
479+
obj := create.GetObject().(*v1.Event)
476480
if tc.verifyEvents {
477481
switch obj.Reason {
478482
case "SuccessfulRescale":

0 commit comments

Comments
 (0)