Skip to content

Commit

Permalink
try to fix periodic test
Browse files Browse the repository at this point in the history
  • Loading branch information
mslabek committed Nov 26, 2024
1 parent 085d803 commit b1521c0
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.scalatest.concurrent.ScalaFutures
import org.scalatest.exceptions.TestFailedException
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.{Millis, Seconds, Span}
import org.testcontainers.utility.DockerImageName
import pl.touk.nussknacker.engine.api.deployment.simple.SimpleStateStatus
import pl.touk.nussknacker.engine.api.deployment.simple.SimpleStateStatus.ProblemStateStatus
Expand Down Expand Up @@ -428,9 +429,12 @@ class PeriodicProcessServiceIntegrationTest
toDeployAfterFinish should have length 1
toDeployAfterFinish.head.scheduleName.value.value shouldBe secondSchedule

val activities = service.getScenarioActivitiesSpecificToPeriodicProcess(processIdWithName).futureValue
val firstActivity = activities.head.asInstanceOf[ScenarioActivity.PerformedScheduledExecution]
activities shouldBe List(
val firstActivity = eventually {
val result = service.getScenarioActivitiesSpecificToPeriodicProcess(processIdWithName).futureValue
result should not be empty
result.head.asInstanceOf[ScenarioActivity.PerformedScheduledExecution]
}
firstActivity shouldBe
ScenarioActivity.PerformedScheduledExecution(
scenarioId = ScenarioId(1),
scenarioActivityId = firstActivity.scenarioActivityId,
Expand All @@ -443,8 +447,7 @@ class PeriodicProcessServiceIntegrationTest
createdAt = firstActivity.createdAt,
retriesLeft = None,
nextRetryAt = None
),
)
)
}

it should "handle multiple one time schedules" in withFixture() { f =>
Expand Down

0 comments on commit b1521c0

Please sign in to comment.