 ;; limitations under the License.
 ;;
 (ns waiter.request-timeout-test
-  (:require [clj-time.core :as time]
-            [clojure.core.async :as async]
+  (:require [clj-time.core :as t]
             [clojure.string :as str]
             [clojure.test :refer :all]
             [clojure.tools.logging :as log]


(defmacro assert-failed-request [service-name response-body start-time-ms timeout-period-sec faulty-app?]
  `(let [end-time-ms# (System/currentTimeMillis)
         elapsed-time-secs# (time/in-seconds (time/millis (- end-time-ms# ~start-time-ms)))]
     (is (>= elapsed-time-secs# ~timeout-period-sec))
     (is (str/includes? ~response-body (str "After " ~timeout-period-sec " seconds, no instance available to handle request.")))
     (when ~faulty-app?

                                      :permitted-user "*"
                                      :token token
                                      :name (str "test" token)
                                      :grace-period-secs (t/in-seconds grace-period)
                                      :cmd-type "shell"})]
          (is (= 200 status) (str "Did not get a 200 response. " body)))
        (log/info "Making request for" token)
