@@ -428,7 +428,10 @@ func TestWaitForAutopilotPlan_RetriesOnTransientErrors(t *testing.T) {
428428 currentCount : & callCount ,
429429 }
430430
431- result , err := waitForAutopilotPlan (t .Context (), cli , logger )
431+ result , err := waitForAutopilotPlanWithBackoff (t .Context (), cli , logger , wait.Backoff {
432+ Duration : 1 * time .Millisecond ,
433+ Steps : 10 ,
434+ })
432435 require .NoError (t , err )
433436 assert .Equal (t , "autopilot" , result .Name )
434437 assert .Equal (t , int32 (4 ), callCount .Load (), "Should have retried 3 times before succeeding" )
@@ -477,7 +480,10 @@ func TestWaitForAutopilotPlan_WaitsForCompletion(t *testing.T) {
477480 callsUntil : 3 , // Will complete after 3 calls
478481 }
479482
480- result , err := waitForAutopilotPlan (t .Context (), cli , logger )
483+ result , err := waitForAutopilotPlanWithBackoff (t .Context (), cli , logger , wait.Backoff {
484+ Duration : 1 * time .Millisecond ,
485+ Steps : 10 ,
486+ })
481487 require .NoError (t , err )
482488 assert .Equal (t , "autopilot" , result .Name )
483489 assert .Equal (t , core .PlanCompleted , result .Status .State )
@@ -510,7 +516,10 @@ func TestWaitForAutopilotPlan_LongRunningUpgrade(t *testing.T) {
510516 callsUntil : 10 , // Will complete after 10 calls - exceeds buggy 5-attempt limit
511517 }
512518
513- result , err := waitForAutopilotPlan (t .Context (), cli , logger )
519+ result , err := waitForAutopilotPlanWithBackoff (t .Context (), cli , logger , wait.Backoff {
520+ Duration : 1 * time .Millisecond ,
521+ Steps : 20 ,
522+ })
514523 require .NoError (t , err , "Should not timeout for long-running upgrades" )
515524 assert .Equal (t , "autopilot" , result .Name )
516525 assert .Equal (t , core .PlanCompleted , result .Status .State )
@@ -624,6 +633,10 @@ func TestWaitForClusterNodesMatchVersion(t *testing.T) {
624633 initialVersion : "v1.29.0+k0s" ,
625634 }
626635 },
636+ backoff : & wait.Backoff {
637+ Duration : 1 * time .Millisecond ,
638+ Steps : 10 ,
639+ },
627640 expectError : false ,
628641 validate : func (t * testing.T , cli client.Client ) {
629642 if mock , ok := cli .(* mockClientWithNodeVersionUpdate ); ok {
@@ -668,6 +681,10 @@ func TestWaitForClusterNodesMatchVersion(t *testing.T) {
668681 targetVersion : "v1.30.0+k0s" ,
669682 }
670683 },
684+ backoff : & wait.Backoff {
685+ Duration : 1 * time .Millisecond ,
686+ Steps : 20 ,
687+ },
671688 expectError : false ,
672689 validate : func (t * testing.T , cli client.Client ) {
673690 if mock , ok := cli .(* mockClientWithStaggeredNodeUpdates ); ok {
@@ -696,8 +713,6 @@ func TestWaitForClusterNodesMatchVersion(t *testing.T) {
696713 backoff : & wait.Backoff {
697714 Duration : 100 * time .Millisecond ,
698715 Steps : 3 ,
699- Factor : 1.0 ,
700- Jitter : 0.1 ,
701716 },
702717 expectError : true ,
703718 errorContains : "cluster nodes did not match version v1.30.0+k0s after upgrade" ,
0 commit comments