           ;; return the instance
           (jruby-protocol/return-instance jruby-service instance :hold-instance-while-pool-flush-in-progress-test)
           ;; wait until the flush is complete
-          @flush-complete)
+          (is (true? (timed-deref flush-complete))
+              "timed out waiting for the flush to complete"))
         ;; now the pool is flushed, and the constants should be cleared
         (is (true? (verify-no-constants pool-context 2)))))))
 

                ;; trigger a flush
                (is (true? (trigger-flush ssl-options)))
                ;; wait for the new pool to become available
                (wait-for-new-pool jruby-service)
                ;; there will only be two instances in the new pool, because we are holding
                ;; references to two from the old pool.
                (is (true? (set-constants-and-verify pool-context 2)))
                ;; borrow and return instance from the new pool until an instance flush is triggered
                (borrow-until-desired-borrow-count jruby-service 10)

                ;; at this point, we still have the main flush in progress, waiting for us
                ;; to release the two instances from the old pool.  we should also have

              (jruby-protocol/return-instance jruby-service instance1 :max-requests-flush-while-pool-flush-in-progress-test)

              ;; wait until the flush is complete
              (is (true? (timed-deref flush-complete))
                  "timed out waiting for the flush to complete"))

            ;; we should have three instances with the constant and one without.
            (is (true? (check-jrubies-for-constant-counts pool-context 3 1)))))))))
