             [clojure.set :as set]
             [clojure.string :as str]
             [clojure.test :refer :all]
+            [clojure.tools.logging :as log]
             [qbits.jet.client.websocket :as ws]
             [waiter.async-utils :as au]
             [waiter.metrics :as metrics]

          (when (< iteration iteration-limit)
            (recur (inc iteration))))
        (async/<!! release-chan))
      (test-helpers/wait-for
        #(let [out-router-metrics-state @router-metrics-agent]
           (= (str "time-" iteration-limit) (get-in out-router-metrics-state [:last-update-times source-router-id])))
        :interval 1000, :unit-multiplier 1)
      (let [query-agent-state (fn [agent-state response-chan] (async/>!! response-chan agent-state) agent-state)
            response-chan (async/promise-chan)
            _ (send router-metrics-agent query-agent-state response-chan)

      (incoming-router-metrics-handler router-metrics-agent 10 encrypt decrypt ws-request)
      (let [release-chan (async/chan 1)]
        (async/go-loop [iteration 0]
          (log/debug "processing iteration" iteration)
          (let [raw-data (cond-> {:router-metrics {"s1" {:iteration iteration}, "s2" {:iteration iteration}},
                                  :source-router-id source-router-id,
                                  :time (str "time-" iteration)}
