Исправлено множество предупреждений
This commit is contained in:
@@ -2,7 +2,6 @@ package com.github.nullptroma.wallenc.task.runtime
|
||||
|
||||
import com.github.nullptroma.wallenc.domain.errors.WallencException
|
||||
import com.github.nullptroma.wallenc.domain.tasks.TaskLogLevel
|
||||
import com.github.nullptroma.wallenc.domain.tasks.TaskProgress
|
||||
import com.github.nullptroma.wallenc.domain.tasks.TaskProgressLabel
|
||||
import com.github.nullptroma.wallenc.domain.tasks.TaskRunState
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
@@ -10,7 +9,6 @@ import kotlinx.coroutines.test.StandardTestDispatcher
|
||||
import kotlinx.coroutines.test.advanceTimeBy
|
||||
import kotlinx.coroutines.test.advanceUntilIdle
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@@ -59,13 +57,13 @@ class TaskOrchestratorTest {
|
||||
title = "Fail",
|
||||
dispatcher = dispatcher,
|
||||
work = { ctx ->
|
||||
ctx.fail(WallencException.Storage.FileNotFound)
|
||||
ctx.fail(WallencException.Storage.FileNotFound())
|
||||
},
|
||||
)
|
||||
advanceUntilIdle()
|
||||
val task = orchestrator.pipelineState.value.tasks.first { it.id == id }
|
||||
val failed = task.state as TaskRunState.Failed
|
||||
assertEquals(WallencException.Storage.FileNotFound, failed.error)
|
||||
assertTrue(failed.error is WallencException.Storage.FileNotFound)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user