                 done()
             lock1.releaseLock().on 'released', (ld) ->
               assert ld?
-              order += '1');
+              order += '1')
 
     it "should give priority to a write request waiting on a write lock over a subsequent read request", (done) ->
       expectedOrder = "112233"

                done()
            lock1.releaseLock().on 'released', (ld) ->
              assert ld?
              order += '1');

    it "should allow a read request to proceed when a prior write request times out", (done) ->
      expectedOrder = "1331"


Lock = require('../index').Lock
LockCollection = require('../index').LockCollection

# Used for simulating dead write requests
setWriteReq = (lock, cb) ->
  lock.collection.findAndModify(
    { files_id: lock.fileId }
    []
    { $set: { write_req: true }}
    {w: lock.lockCollection.writeConcern}
    cb
  )

describe 'gridfs-locks', () ->

