 API = require('../../modules/providers/aws')
 specUtils = require('./utils')
 mockArgs = specUtils.mockArgs
+
+PROMISE_DELAY = 50
 
 describe 'aws', ->
   mockEC2 = specUtils.mock.ec2()


    it 'otherwise should stop the instance', ->
      subject(mockArgs('aws stop dummy.01'))
      waits 20
      runs ->
        expect(specUtils.spies.ec2.stopInstances.mostRecentCall.args[0]).toEqual({
          InstanceIds: [ 'InstanceId' ]


    it 'otherwise should reboot the instance', ->
      subject(mockArgs('aws reboot dummy.01'))
      waits PROMISE_DELAY
      runs ->
        expect(specUtils.spies.ec2.rebootInstances.mostRecentCall.args[0]).toEqual({
          InstanceIds: [ 'InstanceId' ]
