File tree Expand file tree Collapse file tree
app/src/main/kotlin/io/tolgee/ee/service/branching
tests/src/test/kotlin/io/tolgee/ee/api/v2/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,5 @@ class BranchCleanupWorker(
110110 /* *
111111 * Blocks until all in-flight cleanups have finished (success or failure).
112112 */
113- fun waitForPendingCleanups (timeoutMs : Long = 30_000) =
114- branchCleanupTracker.waitForPendingCleanups(timeoutMs)
113+ fun waitForPendingCleanups (timeoutMs : Long = 30_000) = branchCleanupTracker.waitForPendingCleanups(timeoutMs)
115114}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import io.tolgee.fixtures.andIsBadRequest
1313import io.tolgee.fixtures.andIsNotFound
1414import io.tolgee.fixtures.andIsOk
1515import io.tolgee.fixtures.node
16+ import io.tolgee.ee.service.branching.BranchCleanupWorker
1617import io.tolgee.service.contentDelivery.ContentDeliveryConfigService
1718import io.tolgee.testing.annotations.ProjectJWTAuthTestMethod
1819import io.tolgee.testing.assert
@@ -37,6 +38,9 @@ class ContentDeliveryConfigBranchingTest : ProjectAuthControllerTest("/v2/projec
3738 @Autowired
3839 private lateinit var batchJobConcurrentLauncher: BatchJobConcurrentLauncher
3940
41+ @Autowired
42+ private lateinit var branchCleanupWorker: BranchCleanupWorker
43+
4044 @BeforeEach
4145 fun setup () {
4246 batchJobConcurrentLauncher.pause = true
@@ -130,6 +134,8 @@ class ContentDeliveryConfigBranchingTest : ProjectAuthControllerTest("/v2/projec
130134 fun `delete branch deletes CDN configs for that branch` () {
131135 performProjectAuthDelete(" branches/${testData.featureBranch.id} " ).andIsOk
132136
137+ branchCleanupWorker.waitForPendingCleanups()
138+
133139 executeInNewTransaction {
134140 contentDeliveryConfigService.find(testData.featureBranchCdnConfig.self.id).assert .isNull()
135141 // main branch configs are unaffected
You can’t perform that action at this time.
0 commit comments