Skip to content

Commit

Permalink
troubleshooting uncompletedCoroutine error for Unit Test by modifying…
Browse files Browse the repository at this point in the history
… test timeout
  • Loading branch information
ankpshah committed Dec 9, 2023
1 parent 0c796e5 commit faae143
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import io.mockk.every
import io.mockk.mockk
import io.mockk.slot
import io.mockk.verify
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
Expand Down Expand Up @@ -115,7 +116,7 @@ internal class AWSCloudWatchLoggingPluginImplementationTest {
}

@Test
fun `on flush logs error`() = runTest {
fun `on flush logs error`() = runTest(timeout = 30.seconds) {
val onSuccess = mockk<Action>()
val onError = mockk<Consumer<AmplifyException>>()
val exception = slot<AmplifyException>()
Expand Down

0 comments on commit faae143

Please sign in to comment.