                   done())
 
     it "should allow a read request to proceed when a prior write request dies without releasing write_req", (done) ->
-      expectedOrder = "1331"
+      expectedOrder = "12133"
       order = ''
       lock2.timeOut = 100
       lock1.lockExpiration = 1000

                done())

    it "should allow a read request to proceed when a prior write request dies waiting for a write lock without releasing write_req", (done) ->
      expectedOrder = "133"
      order = ''
      lock2.timeOut = 100
      lock1.lockExpiration = 1000

        # set the write_req flag without creating a lock, to simulate a dead write request
        setWriteReq lock2, (err, doc) ->
          assert not err
          order += '2'
          lock1.releaseLock().on 'released', (ld) ->
            assert ld?
            order += '1'
            lock3.obtainReadLock().on 'locked', (ld) ->
              assert ld?
              order += '3'
              lock3.releaseLock().on 'released', (ld) ->
                assert ld?
                order += '3'
                assert.equal order, expectedOrder
                done()

