HomePhorge

(maint) Fix acceptance test for scheduled_task deletion
8821fb5d79b4Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(maint) Fix acceptance test for scheduled_task deletion

This test was accidentally checking that the scheduled task was still in
place in the Windows scheduled task list. Because the
Win32::TaskScheduler#delete call seems to be asynchronous, as long as
the test for scheduled task happened fast enough, it was still seen as
present and the test 'passed'. In fact, puppet resource was scheduling
the task to be removed, and it does get removed. This test began to fail
when the vms slowed down enough that the broken verification step began
to fail because it was no longer executing fast enough to see the
transient task prior to its deletion completing.

This change corrects the verification step to verify by asserting that
the schtasks.exe list command failed (did not show the deleted task).
And it wraps it in a timeout to allow it a few seconds for the scheduled
tasks state to finalize.

Details

Provenance
Josh Partlow <joshua.partlow@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUc0e689cb5cf0: Revert "(maint) Add temp workaround for travis"
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Partlow <joshua.partlow@puppetlabs.com> committed rPU8821fb5d79b4: (maint) Fix acceptance test for scheduled_task deletion (authored by Josh Partlow <joshua.partlow@puppetlabs.com>).Jan 13 2014, 9:17 PM