         (is (= 503 (:status (ping-environment)))))
        (jruby-protocol/return-instance jruby-service jruby-instance :i-want-this-instance)
        (is (not= :timed-out (timed-deref stop-complete?))
-           "timed out waiting for the stop to complete")
+           (str "timed out waiting for the stop to complete, stack:\n"
+                (get-all-stack-traces-as-str)))
        (let [app-context (tk-app/app-context app)]
          ;; We have to re-initialize the JRubyPuppetService here because
          ;; otherwise the tk-app/stop that is included in the

        (let [flush-complete (add-watch-for-flush-complete pool-context)]
          (is (true? (trigger-flush ssl-request-options)))
          (is (true? (timed-deref flush-complete))
              "timed out waiting for the flush to complete"))
        ;; now the pool is flushed, so the constants should be cleared
        (is (true? (verify-no-constants pool-context 4)))))))



              ;; wait until the flush is complete
              (is (true? (timed-deref flush-complete))
                  (str "timed out waiting for the flush to complete, stack:\n"
                       (get-all-stack-traces-as-str))))

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