Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Mull committed Jan 26, 2017
2 parents b235c32 + cb046a0 commit 5883b46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions test/puppetlabs/puppetdb/amq_migration_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[puppetlabs.puppetdb.cli.services :refer [shared-globals]]
[puppetlabs.puppetdb.scf.storage-utils :as sutils]
[puppetlabs.puppetdb.testutils.db :refer [*db* with-test-db]]
[puppetlabs.puppetdb.testutils :as tutils]
[puppetlabs.puppetdb.testutils :as tu]
[puppetlabs.trapperkeeper.app :refer [get-service]]
[puppetlabs.trapperkeeper.services :refer [service-context]]
[puppetlabs.kitchensink.core :as ks]
Expand Down Expand Up @@ -122,7 +122,7 @@
(svc-utils/call-with-puppetdb-instance
(assoc config :database *db*)
(fn []
(await-processed 2 before-start-state tutils/default-timeout-ms)
(await-processed 2 before-start-state tu/default-timeout-ms)
(is (not (needs-upgrade? config)))
(let [results (cli-utils/get-catalogs "basic.wire-catalogs.com")]
(is (= 1 (count results)))
Expand Down Expand Up @@ -161,7 +161,7 @@
(svc-utils/call-with-puppetdb-instance
(assoc config :database *db*)
(fn []
(await-processed 1 before-start-state tutils/default-timeout-ms)
(await-processed 1 before-start-state tu/default-timeout-ms)
(is (= 2
(-> svc-utils/*server*
dlo-paths
Expand All @@ -176,7 +176,7 @@
(with-test-db
(let [config (svc-utils/create-temp-config)
defaulted-config (conf/process-config! (assoc config :database *db*))
mock-upgrade-fn (tutils/mock-fn)]
mock-upgrade-fn (tu/mock-fn)]

(is (not (needs-upgrade? config)))

Expand Down
11 changes: 6 additions & 5 deletions test/puppetlabs/puppetdb/command_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
[puppetlabs.puppetdb.queue :as queue]
[puppetlabs.trapperkeeper.services
:refer [service-context]]
[overtone.at-at :refer [mk-pool scheduled-jobs]])
[overtone.at-at :refer [mk-pool scheduled-jobs]]
[puppetlabs.puppetdb.testutils :as tu])
(:import [java.util.concurrent TimeUnit]
[org.joda.time DateTime DateTimeZone]))

Expand Down Expand Up @@ -1305,7 +1306,7 @@

(handle-message (store-command' q new-catalog-cmd))

(is (= ::handled-first-message (deref fut (* 1000 60) nil)))
(is (= ::handled-first-message (deref fut tu/default-timeout-ms nil)))
(is (empty? (fs/list-dir (:path dlo))))
(let [failed-cmdref (take-with-timeout!! command-chan default-timeout-ms)]
(is (= 1 (count (:attempts failed-cmdref))))
Expand Down Expand Up @@ -1672,9 +1673,9 @@

(.release semaphore)

(is (not= ::timed-out (deref cmd-1 5000 ::timed-out)))
(is (not= ::timed-out (deref cmd-2 5000 ::timed-out)))
(is (not= ::timed-out (deref cmd-3 5000 ::timed-out)))
(is (not= ::timed-out (deref cmd-1 tu/default-timeout-ms ::timed-out)))
(is (not= ::timed-out (deref cmd-2 tu/default-timeout-ms ::timed-out)))
(is (not= ::timed-out (deref cmd-3 tu/default-timeout-ms ::timed-out)))

;; There's currently a lot of layering in the messaging
;; stack. The callback mechanism that delivers the promise
Expand Down

0 comments on commit 5883b46

Please sign in to comment.