Skip to content

Commit

Permalink
Fix VMware scheduler test
Browse files Browse the repository at this point in the history
Now we allow migrating with more disks than the MaxInFlight in case
there is no VM being migrated at that time. This is done for the user's
convenience.

Related to: #1087

Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas committed Oct 9, 2024
1 parent 8a8c742 commit bae6249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/plan/scheduler/vsphere/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ func (r *Scheduler) cost(vm *model.VM, vmStatus *plan.VMStatus) int {
func (r *Scheduler) finishedDisks(vmStatus *plan.VMStatus) int {
var resp = 0
for _, step := range vmStatus.Pipeline {
if step.Name == "DiskTransfer" {
if step.Name == DiskTransfer {
for _, task := range step.Tasks {
if task.Phase == "Completed" {
if task.Phase == Completed {
resp += 1
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/plan/scheduler/vsphere/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestScheduler(t *testing.T) {
},
hostC: {
{
cost: 1,
cost: 11,
},
{
cost: 2,
Expand Down

0 comments on commit bae6249

Please sign in to comment.