Update streaming tests to the new testApplication API
goncalossilva opened this issue · 0 comments
goncalossilva commented
Events are sent, but never received. I suspect it's down to both server and client running on the same process during testing, sharing the same coroutines dispatcher, and going into a deadlock. Unfortunately, it's not possible to configure the dispatcher of either to validate this assumption. They both use Dispartchers.IO
and there are plans to provide ways to override them, but probably not soon.
The header documents the high-level approach I went for:
ffs/ffs-server/src/test/kotlin/routes/SseRoutesTest.kt
Lines 51 to 76 in 474b689