diff --git a/library/runtime-ctrl/src/commonTest/kotlin/io/matthewnelson/kmp/tor/runtime/ctrl/internal/TempTorCmdQueueUnitTest.kt b/library/runtime-ctrl/src/commonTest/kotlin/io/matthewnelson/kmp/tor/runtime/ctrl/internal/TempTorCmdQueueUnitTest.kt index 6140526a7..04ab0468f 100644 --- a/library/runtime-ctrl/src/commonTest/kotlin/io/matthewnelson/kmp/tor/runtime/ctrl/internal/TempTorCmdQueueUnitTest.kt +++ b/library/runtime-ctrl/src/commonTest/kotlin/io/matthewnelson/kmp/tor/runtime/ctrl/internal/TempTorCmdQueueUnitTest.kt @@ -24,8 +24,20 @@ import kotlin.test.* class TempTorCmdQueueUnitTest { - private val ctrl = TestCtrl() - private val queue = TempTorCmdQueue.of(UncaughtException.Handler.THROW) + private lateinit var ctrl: TestCtrl + private lateinit var queue: TempTorCmdQueue + + @BeforeTest + fun setup() { + ctrl = TestCtrl() + queue = TempTorCmdQueue.of(UncaughtException.Handler.THROW) + } + + @AfterTest + fun tearDown() { + ctrl.destroy() + queue.destroy() + } @Test fun givenEnqueuedJob_whenAttach_thenIsTransferred() {