Skip to content

Instantly share code, notes, and snippets.

@jordanrobinson
Created September 1, 2023 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanrobinson/483283e8bca3aa04db90f36eb5bc5644 to your computer and use it in GitHub Desktop.
Save jordanrobinson/483283e8bca3aa04db90f36eb5bc5644 to your computer and use it in GitHub Desktop.
awaitility-clj example
(: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