         (doseq [server [:mock-server-1 :mock-server-2 :mock-server-3]]
           (testing (str "connected to " server ", inventory response received, and agent unreachable")
             (let [[response1 response2] (get responses server)]
-              (let [answer (deref response1 3000 nil)]
+              (let [answer (deref response1 10000 nil)]
                 (is answer)
                 (is (= "http://puppetlabs.com/inventory_response" (:message_type answer)))
                 (is (= (:id inventory-request) (:in_reply_to answer)))
                 (is (= [] (get-in answer [:data :uris]))))
 
-              (let [answer (deref response2 3000 nil)]
+              (let [answer (deref response2 10000 nil)]
                 (is answer)
                 (is (= "http://puppetlabs.com/error_message" (:message_type answer)))
                 (is (= (:id agent-request) (:in_reply_to answer)))

                        "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)]
          (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)]
            (is update)
            (reset! inventory-update (promise))
            (is (= [{:client agent-uri :change 1}] (:changes (client/get-data update))))))

        (let [update (deref @inventory-update 3000 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 10000 nil)]
          (is answer)
          (is (= "http://puppetlabs.com/error_message" (:message_type answer)))
          (is (= (:id spoof-sender-request) (:in_reply_to answer)))
