                         "http://puppetlabs.com/inventory_response" (deliver inventory-response msg)
                         "http://puppetlabs.com/inventory_update" (deliver @inventory-update msg))))]
       (with-app-with-config app (conj broker-services server/mock-server) broker-config
-        (let [answer (deref inventory-response 3000 nil)]
+        (let [answer (deref inventory-response 10000 nil)]
           (is answer)
           (is (= (:id inventory-subscribe) (:in_reply_to answer)))
           (is (= [] (get-in answer [:data :uris]))))
 
         (with-open [client (client/connect :certname agent-cert)]
-          (let [update (deref @inventory-update 3000 nil)]
+          (let [update (deref @inventory-update 10000 nil)]
             (is update)
             (reset! inventory-update (promise))
             (is (= [{:client agent-uri :change 1}] (:changes (client/get-data update))))))
 
-        (let [update (deref @inventory-update 3000 nil)]
+        (let [update (deref @inventory-update 10000 nil)]
           (is update)
           (is (= [{:client agent-uri :change -1}] (:changes (client/get-data update)))))))))
 

                      (catch Exception e (println "controller-prevent-spoofed-sender-test exception:" (.getMessage e)))))
                  server/on-text (fn [_ ws text] (deliver response (message/decode text)))]
      (with-app-with-config app (conj broker-services server/mock-server) broker-config
        (let [answer (deref response 3000 nil)]
          (is answer)
          (is (= "http://puppetlabs.com/error_message" (:message_type answer)))
          (is (= (:id spoof-sender-request) (:in_reply_to answer)))

  (let [connected (promise)]
    (with-redefs [server/on-connect (fn [_ ws] (deliver connected true))]
      (with-app-with-config app (conj broker-services server/mock-server) broker-config
        (is (deref connected 10000 nil))))))

(def inventory-request (message/make-message
                         {:message_type "http://puppetlabs.com/inventory_request"
