            ping-environment #(->> request (handler-core/wrap-params-for-jruby) (handler/handle-request handler-service))
            stop-complete? (future (tk-app/stop app))]
        (let [start (System/currentTimeMillis)]
-         (while (and
-                 (< (- (System/currentTimeMillis) start) 10000)
-                 (not= 503 (:status (ping-environment))))
-           (Thread/yield))
-         (is (= 503 (:status (ping-environment))))
+         (logging/with-test-logging
+          (while (and
+                  (< (- (System/currentTimeMillis) start) 10000)
+                  (not= 503 (:status (ping-environment))))
+            (Thread/yield))
+          (is (= 503 (:status (ping-environment)))))
          (jruby-protocol/return-instance jruby-service jruby-instance :i-want-this-instance)
          @stop-complete?
-         (is (= 503 (:status (ping-environment)))))))))
+         (logging/with-test-logging
+          (is (= 503 (:status (ping-environment))))))))))
 
 (deftest ^:integration test-503-when-jruby-is-first-to-shutdown
   (testing "During a shutdown requests result in 503 http responses"

         ;; JRubyPuppetService is already stopped.
         (swap! app-context assoc :JRubyPuppetService {})
         (tk-internal/run-lifecycle-fn! app-context tk-services/init "init" :JRubyPuppetService jruby-service)
         (tk-internal/run-lifecycle-fn! app-context tk-services/start "start" :JRubyPuppetService jruby-service))))))
            [puppetlabs.ssl-utils.core :as ssl-utils]
            [puppetlabs.kitchensink.testutils :as ks-testutils]
            [puppetlabs.puppetserver.testutils :as testutils :refer
             [ca-cert localhost-cert localhost-key ssl-request-options]]
            [puppetlabs.trapperkeeper.testutils.logging :as logging]))

(def test-resources-dir
  "./dev-resources/puppetlabs/services/jruby/jruby_pool_int_test")
