Skip to content

Instantly share code, notes, and snippets.

View dbriones's full-sized avatar

Dante Briones dbriones

View GitHub Profile
@dbriones
dbriones / throttle-not-affected-by-time.clj
Last active August 29, 2015 14:04
throttle unaffected by riemann.time.controlled/advance!
(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]}))
@dbriones
dbriones / config.clj
Created August 19, 2014 00:16
`reinject` doesn't seem to work in testing mode
(streams
prn
(where (service "digital")
(with :service "analog" reinject)))
(tests
(deftest reinject-test
(inject! [{:service "digital"}])))