diff --git a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/batch/BatchJobManagementControllerTest.kt b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/batch/BatchJobManagementControllerTest.kt index 749bca5b95..4f4889f9b5 100644 --- a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/batch/BatchJobManagementControllerTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/batch/BatchJobManagementControllerTest.kt @@ -232,17 +232,19 @@ class BatchJobManagementControllerTest : ProjectAuthControllerTest("/v2/projects val adminsJobs = (1..3).map { runChunkedJob(50) } val anotherUsersJobs = (1..3).map { runChunkedJob(50, testData.anotherUser) } - performProjectAuthGet("current-batch-jobs") - .andIsOk.andPrettyPrint.andAssertThatJson { - node("_embedded.batchJobs") { - isArray.hasSize(6) - node("[0].status").isEqualTo("RUNNING") - node("[1].status").isEqualTo("RUNNING") - node("[2].status").isEqualTo("PENDING") + try { + performProjectAuthGet("current-batch-jobs") + .andIsOk.andPrettyPrint.andAssertThatJson { + node("_embedded.batchJobs") { + isArray.hasSize(6) + node("[0].status").isEqualTo("RUNNING") + node("[1].status").isEqualTo("PENDING") + node("[2].status").isEqualTo("PENDING") + } } - } - - wait = false + } finally { + wait = false + } waitForNotThrowing(pollTime = 1000, timeout = 10000) { val dtos = (adminsJobs + anotherUsersJobs).map { batchJobService.getJobDto(it.id) }