Skip to content
Snippets Groups Projects
Unverified Commit 3c0b5ab7 authored by Chris Truter's avatar Chris Truter Committed by GitHub
Browse files

Tweak failure map size and test (#45970)

parent db7cadb6
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@
(def ^:private ^ConcurrentHashMap cached-failures (ConcurrentHashMap.))
(def ^:private max-size 10)
(def ^:private max-size 10000)
(def ^:private max-retries 2)
......
......@@ -9,6 +9,7 @@
{:id (swap! id-generator inc) :dataset_query (rand)})
(def ^:private max-retries @#'failure-map/max-retries)
(def ^:private max-size @#'failure-map/max-size)
(deftest failure-map-non-retryable-test
......@@ -43,7 +44,8 @@
(is (every? failure-map/non-retryable? random-cards)))
(testing "But the number that we recall is bounded\n"
(let [extra-card (random-card)]
(failure-map/track-failure! extra-card)
(dotimes [_ max-retries]
(failure-map/track-failure! extra-card))
(is (false? (failure-map/non-retryable? extra-card)))
(testing "... with replacement"
(failure-map/track-success! (first random-cards))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment