Skip to content

Commit

Permalink
(PDB-5663) default-timeout-behavior: increase slack for slower hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrw committed Aug 4, 2023
1 parent dc5c203 commit 857ae27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/puppetlabs/puppetdb/query_timeout_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@
(let [[{:keys [status body]} elapsed] (timed-nodes-query)]
(is (= 200 status) "timeout after first row should produce 200")
(is (str/includes? body "exceeded timeout"))
(is (< 0.2 elapsed 0.4)))
(is (< 0.2 elapsed 0.5)))
(let [[{:keys [status body]} elapsed] (timed-nodes-query :timeout 0.1)]
(is (= 200 status) "timeout after first row should produce 200")
(is (str/includes? body "exceeded timeout"))
(is (< 0 elapsed 0.2)))
(let [[{:keys [status body]} elapsed] (timed-nodes-query :timeout 0.4)]
(let [[{:keys [status body]} elapsed] (timed-nodes-query :timeout 0.5)]
(is (= 200 status) "timeout after first row should produce 200")
(is (str/includes? body "exceeded timeout"))
(is (< 0.3 elapsed 0.5))))))))
(is (< 0.5 elapsed 0.7))))))))

(deftest max-timeout-behavior
(with-unconnected-test-db
Expand Down

0 comments on commit 857ae27

Please sign in to comment.