Last active
August 29, 2015 14:04
-
-
Save dbriones/91642eadd4e3d16723d7 to your computer and use it in GitHub Desktop.
throttle unaffected by riemann.time.controlled/advance!
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
(streams | |
(throttle 1 10 | |
(tap :throttle | |
#(info %)))) | |
(tests | |
(let [input {:service "some-service"}] | |
(deftest throttle-should-allow-events-after-window-passes | |
(is (= (inject! [input]) | |
{:throttle [input]})) | |
(is (= (inject! [input]) | |
{:throttle []})) | |
(riemann.time.controlled/advance! 11) | |
(is (= (inject! [input]) | |
{:throttle [input]}))))) |
Author
dbriones
commented
Aug 6, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment