Created
September 1, 2023 13:57
-
-
Save jordanrobinson/483283e8bca3aa04db90f36eb5bc5644 to your computer and use it in GitHub Desktop.
awaitility-clj example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(:require [awaitility-clj.core :refer [wait-for]]) | |
(let [start-time (System/currentTimeMillis) | |
end-time (+ start-time 200)] | |
(wait-for {:at-most [1 :seconds]} ; options such as at-most and poll-interval | |
(fn [] (>= (System/currentTimeMillis) end-time)))) ; function that will eventually return true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment