Skip to content

Commit 81265f1

Browse files
committed
Use random-ascii-string in benchmark.clj as well
Fixes another area where FIPS DRBG per-request-limits could crop up in benchmark.clj. RandomStringUtils is only referenced in random.clj now. Signed-off-by: Josh Partlow <jpartlow@glatisant.org>
1 parent 802a0de commit 81265f1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/puppetlabs/puppetdb/cli/benchmark.clj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@
153153
ScheduledThreadPoolExecutor
154154
Semaphore
155155
TimeUnit)
156-
(org.apache.commons.compress.archivers.tar TarArchiveEntry)
157-
(org.apache.commons.lang3 RandomStringUtils)))
156+
(org.apache.commons.compress.archivers.tar TarArchiveEntry)))
158157

159158
;; FIXME: make sure --queriers respects DISCARD_ALL_QUERIES
160159

@@ -311,9 +310,9 @@
311310
(defmethod touch-parameter-value String [p]
312311
(let [len (count p)]
313312
(if (zero? len)
314-
(.nextAscii (RandomStringUtils/secure) 1) ; empty -> single char
313+
(rnd/random-ascii-string 1) ; empty -> single char
315314
(loop [attempts 5]
316-
(let [new-val (.nextAscii (RandomStringUtils/secure) len)]
315+
(let [new-val (rnd/random-ascii-string len)]
317316
(if (or (not= new-val p) (zero? attempts))
318317
new-val
319318
(recur (dec attempts))))))))

0 commit comments

Comments
 (0)