Commit Graph

3 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala 50fac882cf
events: make "WithClock" methods allowed without "unit" build tag (#62)
There are use cases where having those methods available even outside of a unit test is helpful, such as when the objects are instantiated with a clock that could be mocked in the unit test for the parent method.

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-09-13 14:59:34 -07:00
Josh van Leeuwen c007625dc6
Always wait in close, Speed up eventqueue tests & don't pass clock (#59)
* Don't pass clock to processor, and speed up tests

Signed-off-by: joshvanl <me@joshvanl.dev>

* Review comments

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-08-28 17:31:14 -07:00
Josh van Leeuwen 569cc87ddb
Adds batcher utility (#58)
* Adds batcher utility

Signed-off-by: joshvanl <me@joshvanl.dev>

* Add `WithClock` for testing

Signed-off-by: joshvanl <me@joshvanl.dev>

* Renamees eventqueue to queue, and move queue and batcher under events

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-08-14 13:04:38 -07:00