Weird setTimeout/Promise Test Bug

We use a setTimeout() function to check the status of an OpsWork Deployment whether it is done before proceeding on to the next OpsWork Deployment.

For some reason, on CircleCI, it just bails out after a few seconds. We tested it on Vagrant, Jenkins and Docker, and they all ran perfectly.

On our machine, this is the expected behaviour
[07:15:53] Using gulpfile /home/vagrant/sites/ [07:15:53] Starting 'deploy:install'... [07:22:07] Finished 'deploy:install' after 6.23 min

But on CircleCI
[06:37:05] Using gulpfile ~/ [06:37:05] Starting 'deploy:install'...

As you can see, it just bails out a the command before waiting for the timeout to return.

Our simple check code: