             [puppetlabs.puppetdb.testutils
              :refer [args-supplied call-counter dotestseq times-called]]
             [puppetlabs.puppetdb.jdbc :refer [query-to-vec] :as jdbc]
+            [puppetlabs.puppetdb.jdbc-test :refer [full-sql-exception-msg]]
             [puppetlabs.puppetdb.examples :refer :all]
             [puppetlabs.puppetdb.testutils.services :as svc-utils]
             [puppetlabs.puppetdb.command.constants :refer [command-names]]


            (test-msg-handler new-facts-cmd publish discard-dir
              (reset! second-message? true)
              (is (re-matches
                   #"(?sm).*ERROR: could not serialize access due to concurrent update.*"
                   (extract-error-message publish))))
            @fut
            (is (true? @first-message?))
            (is (true? @second-message?))))))))

                       :payload facts}

            hand-off-queue (java.util.concurrent.SynchronousQueue.)
            storage-replace-facts! scf-store/update-facts!
            failures (atom ())
            orig-annotate-attempt mql/annotate-with-attempt]

        (jdbc/with-db-transaction []
          (scf-store/add-certname! certname)
