                  :payload (get-in wire-catalogs [4 :empty])}
         certname (get-in command [:payload :name])
         cmd-producer-timestamp (get-in command [:payload :producer-timestamp])
-        current-time (now)]
+        recent-time (-> 1 seconds ago)]
     (with-fixtures
       (test-msg-handler command publish discard-dir
         (is (false? (contains? (:payload command) :producer-timestamp)))

            [puppetlabs.puppetdb.testutils.reports :refer [munge-example-report-for-storage]]
            [puppetlabs.puppetdb.command.constants :refer [command-names]]
            [clj-time.coerce :refer [to-timestamp to-date-time to-string]]
            [clj-time.core :as t :refer [days ago now]]
            [clojure.test :refer :all]
            [clojure.tools.logging :refer [*logger-factory*]]
            [slingshot.slingshot :refer [throw+]]

        (is (empty? (fs/list-dir discard-dir)))
        ;;v4 does not include a producer_timestmap, the backend
        ;;should use the time the command was received instead
        (is (t/before? recent-time
                       (-> (query-to-vec "SELECT producer_timestamp FROM catalogs")
                           first
                           :producer_timestamp
                           to-date-time)))))))

(defn update-resource
  "Updated the resource in `catalog` with the given `type` and `title`.
