Tom
04/05/2023, 11:49 AMrunBlocking
is used on the ktor using code. We don’t yet have a standardised approach for where to actually place the runBlocking
so some tests wrap only the called methods (although other non async code is placed inside the block oftentimes), other have the entire test method as `fun some test
= runBlocking {` . I was wondering if pushing the block lower into our logic (either into a facade or into the controllers as the first point of calling ktor) to avoid the aforementioned mishmash altogether would be a good idea. I’d be grateful for any pointers/opinions.Petter Måhlén
04/05/2023, 12:14 PMTom
04/05/2023, 12:20 PMPetter Måhlén
04/05/2023, 1:20 PMTom
04/05/2023, 1:28 PMPetter Måhlén
04/05/2023, 1:31 PMJoffrey
04/05/2023, 2:09 PMkotlinx-coroutines-test
Tom
04/05/2023, 4:57 PMrunBlocking
(as some coroutine scope is required) and if so, should it be done as early as possible (wrapping the call in a controller function) or in the last place, that being the actual test methodJoffrey
04/05/2023, 9:07 PM