           lock-thread (future (.lock pool)
                               (deliver lock-started? true)
                               @unlock?
-                              (.unlock pool))]
+                              (.unlock pool)
+                              true)]
       @lock-started?
       (is (.isLocked pool))
       (is (thrown? IllegalStateException (.unlock pool)))
       (deliver unlock? true)
-      @lock-thread
+      (is (true? (timed-deref lock-thread))
+          "timed out waiting for lock thread to finish")
       (is (not (.isLocked pool))))))
 
 (deftest pool-release-item-test

    (let [pool (create-populated-pool 1)]
      (.lock pool)
      (is (.isLocked pool))
      (is (nil? @(future (.borrowItemWithTimeout pool
                                                 1
                                                 TimeUnit/MICROSECONDS))))
      (let [borrow-thread-started? (promise)
            borrow-thread-borrowed? (promise)
            borrow-thread (future (deliver borrow-thread-started? true)
                                  (let [instance (.borrowItem pool)]
                                    (deliver borrow-thread-borrowed? true)
                                    (.releaseItem pool instance)))]
        @borrow-thread-started?
        (is (not (realized? borrow-thread-borrowed?)))
        (.unlock pool)
        @borrow-thread
        (is (not (.isLocked pool)))))))

(deftest pool-can-borrow-after-borrow-interrupted-during-lock

                              (.lock pool)
                              (deliver lock-acquired? true)
                              @unlock?
                              (.unlock pool)
                              true)]
      @blocked-borrow-thread-started?
      @lock-thread-started?
      (is (not (realized? blocked-borrow-thread-borrowed?)))
