flosch
09/10/2020, 5:36 AMFlow<T>.throttleFirst()
here. @elizarov wrote that to test such an operator we would have to use the DelayController
if available instead of System.currentTimeMills()
, which of course makes total sense. My question: How could I publish this library without having kotlinx-coroutines-test
in the release dependencies? Meaning how would I prevent the user of my library having kotlinx-coroutines-test
in their release binaries when they use my dependency?louiscad
09/10/2020, 7:31 AMTimeSource.Monotonic
and delay
(experimental time API). Then, if users use delay controlling dispatcher, it will just work, without you having to do anything special.flosch
09/10/2020, 12:19 PMlouiscad
09/10/2020, 12:28 PMSystem.nanoTime()
yourself (on JVM/ART, other platforms have different APIs), and count milliseconds after converting from nanos, or count it all in nanoseconds.flosch
09/10/2020, 12:32 PMDelayController
, when testing my custom operator. Or am I missing something?louiscad
09/10/2020, 12:41 PMdelay
which is controlled by DelayController
in test conditions.DelayController
from under would be surprising to the consumer projects and might break other parts of the test(s).flosch
09/10/2020, 12:43 PM