Fix while loop in worker shutdown unit test
Fix while loop in worker shutdown unit test

Change the while loop into a for loop to ensure the test exit after set time.

StackStorm/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2