Skip to content

Commit

Permalink
evacuate executor
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniokrait committed Sep 30, 2023
1 parent fcfd005 commit 220c85d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import java.util.concurrent.Executor
import java.util.concurrent.Executors

class LottieTestRule : TestWatcher() {
private val defaultExecutor = Executors.newCachedThreadPool()

override fun starting(description: Description) {
LottieTask.EXECUTOR = Executor(Runnable::run)
}

override fun finished(description: Description) {
LottieTask.EXECUTOR = Executors.newCachedThreadPool()
LottieTask.EXECUTOR = defaultExecutor
}
}

0 comments on commit 220c85d

Please sign in to comment.