Skip to content

Commit

Permalink
Merge pull request #19530 from kbrock/statemachine_sporadic_fix
Browse files Browse the repository at this point in the history
fix sporadic test with state_machine_spec
  • Loading branch information
carbonin authored Nov 18, 2019
2 parents 51bc142 + 68e2748 commit 9d5d833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/models/miq_provision/state_machine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@

task.signal(:post_create_destination)

expect(task.destination.retires_on).to be_between(retires_on - 1.second, retires_on + 1.second)
expect(vm.reload.retires_on).to be_between(retires_on - 1.second, retires_on + 1.second)
expect(task.destination.retires_on).to be_between(retires_on - 2.seconds, retires_on + 2.seconds)
expect(vm.reload.retires_on).to be_between(retires_on - 2.seconds, retires_on + 2.seconds)
expect(vm.retirement_warn).to eq(0)
expect(vm.retired).to be_falsey
end
Expand All @@ -135,7 +135,7 @@
task.signal(:post_create_destination)

expect(task.destination.retires_on).to eq(retires_on)
expect(vm.reload.retires_on).to be_between(retires_on - 1.second, retires_on + 1.second)
expect(vm.reload.retires_on).to be_between(retires_on - 2.seconds, retires_on + 2.seconds)
expect(vm.retirement_warn).to eq(retirement_warn_days)
expect(vm.retired).to be_falsey
end
Expand Down

0 comments on commit 9d5d833

Please sign in to comment.