diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by name with multiple words #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by name with multiple words #0.png index 2faa0fce27b..58650a450c5 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by name with multiple words #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by name with multiple words #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #0.png index 8f79298458d..eb1efbb55f4 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #1.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #1.png index a7f073a9601..56cb0e2a071 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #1.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should allow filtering by usage #1.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should apply filters from query #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should apply filters from query #0.png index 5862bd56258..984ad5d2a56 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should apply filters from query #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should apply filters from query #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display component #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display component #0.png index 70f95efa447..4b7352cf0d6 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display component #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display component #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display usages #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display usages #0.png index e5cc8a1b1b0..af652133866 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display usages #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should display usages #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #0.png index 821872447cf..753570d5904 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #0.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #1.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #1.png index 79f4a5c188a..bab27b48f4b 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #1.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #1.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #2.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #2.png index 5584ba90ae7..a338d4876c2 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #2.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usage types #2.png differ diff --git a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usages #0.png b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usages #0.png index 8bfa0387e8b..c4b60b68bcf 100644 Binary files a/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usages #0.png and b/designer/client/cypress/e2e/__image_snapshots__/electron/Linux/Components list should filter usages #0.png differ diff --git a/engine/flink/management/periodic/src/test/scala/pl/touk/nussknacker/engine/management/periodic/PeriodicProcessServiceIntegrationTest.scala b/engine/flink/management/periodic/src/test/scala/pl/touk/nussknacker/engine/management/periodic/PeriodicProcessServiceIntegrationTest.scala index 0fd79cd3c06..889b47a577f 100644 --- a/engine/flink/management/periodic/src/test/scala/pl/touk/nussknacker/engine/management/periodic/PeriodicProcessServiceIntegrationTest.scala +++ b/engine/flink/management/periodic/src/test/scala/pl/touk/nussknacker/engine/management/periodic/PeriodicProcessServiceIntegrationTest.scala @@ -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 @@ -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, @@ -443,8 +447,7 @@ class PeriodicProcessServiceIntegrationTest createdAt = firstActivity.createdAt, retriesLeft = None, nextRetryAt = None - ), - ) + ) } it should "handle multiple one time schedules" in withFixture() { f => diff --git a/utils/kafka-test-utils/src/main/scala/pl/touk/nussknacker/engine/kafka/KafkaClient.scala b/utils/kafka-test-utils/src/main/scala/pl/touk/nussknacker/engine/kafka/KafkaClient.scala index f03f23002ee..63889dacfd0 100644 --- a/utils/kafka-test-utils/src/main/scala/pl/touk/nussknacker/engine/kafka/KafkaClient.scala +++ b/utils/kafka-test-utils/src/main/scala/pl/touk/nussknacker/engine/kafka/KafkaClient.scala @@ -7,13 +7,12 @@ import org.apache.kafka.clients.admin.{NewTopic, TopicDescription} import org.apache.kafka.clients.consumer.KafkaConsumer import org.apache.kafka.clients.producer.{Callback, KafkaProducer, ProducerRecord, RecordMetadata} import org.apache.kafka.common.header.Headers -import retry.When import java.time.Duration import java.util import java.util.{Collections, UUID} import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent.{Future, Promise} +import scala.concurrent.{Await, Future, Promise} import scala.jdk.CollectionConverters._ import scala.util.{Failure, Success, Try} import scala.concurrent.duration._ @@ -33,12 +32,15 @@ class KafkaClient(kafkaAddress: String, id: String) extends LazyLogging { def createTopic(name: String, partitions: Int = 5): Unit = { adminClient.createTopics(Collections.singletonList(new NewTopic(name, partitions, 1: Short))).all().get() // When kraft enabled, topics doesn't appear instantly after createTopic - retry.Pause(10, 1.second)(Timer.default)( - Future { - topic(name) - } + val timeout = 10.seconds + Await.result( + retry.Pause(10, 1.second)(Timer.default)( + Future { + topic(name) + } + ), + timeout ) - } def deleteTopic(name: String): Unit =