         @redis.get 'reservation-test_resource', (err, resp) ->
           assert.equal resp, 'MOCK'
           done()
-  
+
   it 'handles failing jobs', (done) ->
     @redis.set 'reservation-test_resource', 'MOCK', (err, resp) =>
       test_worker = new FailWorker resource_id: 'test_resource', (err, resp) =>

      worker_domain.dispose()
    worker_domain.once 'error', (err) => @_complete err  # only call complete once
    @reservation = new ReserveResource @constructor._name,
      process.env.REDIS_HOST or null,
      process.env.REDIS_PORT or null,
      @_hearbeat_interval,
      @_lock_ttl
    setImmediate =>

  _run: (payload, cb) -> cb new Error "must implement _run"
  _hearbeat_interval: 10*60*1000  # 10 minutes in milliseconds for resource reservation
  _lock_ttl: 30*60  # 30 minutes in seconds for resource reservation

class LockWorker extends BaseWorker
  @_name: 'test_worker'
