         ;; Or maybe a ByteBuf?
         (is (= msg (second decoded)))
         (finally
-          (strm/close! decode-src))))))
+          (strm/close! decode-src)
+          (let [logger (log/std-out-log-factory)]
+            (log/flush-logs! logger @log-atom)))))))
 (comment (check-decoder)
          )
 
 (deftest handshake
   (let [logger (log/std-out-log-factory)
-        log-state (atom (log/init))
-        prelog (utils/pre-log "Handshake test")]
-    (log/info log-state ::top-level "Top")
+        prelog (utils/pre-log "Handshake test")
+        log-atom (atom (log/info (log/init) ::top-level "Top"))]
     (let [client->server (strm/stream)
           server->client (strm/stream)
           succeeded? (dfrd/deferred)

                      ;; Q: But is it worth it for the test's sake?
                      ;; Better Q: Is this the sort of thing that will trip
                      ;; us up with surprising behavior if it doesn't work?
                      (let [state (message/get-state io-handle time-out ::timed-out)
                            prelog' (utils/pre-log message-loop-name)]
                        (log/debug prelog'
                                   "get-state returned:" state
                                   "\nScheduled from:\n" prelog)
                        (if (or (= ::timed-out state)
                                (instance? Throwable state)
                                (nil? state))

          (throw (ex-info "Sending failed"
                          {::failed-on frame
                           ::context prelog}))
          (swap! log-atom
                 log/debug
                 ::buffer-response!
                 "frame sent"
                 {::frame-size (count array)}))))))
(comment
  ;; Inline test for test-helper.
  ;; This seems like a bad sign.
