diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3da1dc06..c4b902e59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache local Maven repository uses: actions/cache@v2 with: diff --git a/.github/workflows/release-patch.yml b/.github/workflows/release-patch.yml index 3e53b8471..c212ee59f 100644 --- a/.github/workflows/release-patch.yml +++ b/.github/workflows/release-patch.yml @@ -17,7 +17,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v2 with: - java-version: 11 + java-version: 17 java-package: jdk distribution: adopt architecture: x64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cd8e8952..12498cbf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v2 with: - java-version: 11 + java-version: 17 java-package: jdk distribution: adopt architecture: x64 diff --git a/CHANGELOG.md b/CHANGELOG.md index b3cffecb7..2eba6ad91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [unreleased] +### Changed +- Upgrade to Spring Boot 3. +- ### Fixed - KafkaEventReceiver progress logger will actually log the process during normal application bootstrapping. diff --git a/cli/pom.xml b/cli/pom.xml index f53cad8ef..06f3824b0 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -97,7 +97,7 @@ com.github.sparow199 apollo-client-maven-plugin - 3.1.0 + 3.3.1 graphql-generate-sources diff --git a/it/pom.xml b/it/pom.xml index a26e4fc40..c247060b7 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -11,6 +11,7 @@ stream-registry-it + 6.0.12 ${project.build.directory}/graphql-schema/schema.json com.expediagroup.streamplatform.streamregistry.graphql.client.test @@ -69,6 +70,12 @@ annotations 19.0.0 + + org.springframework + spring-test + ${spring-test.version} + test + @@ -100,7 +107,7 @@ com.github.sparow199 apollo-client-maven-plugin - 3.1.0 + 3.3.1 graphql-generate-sources diff --git a/it/src/test/java/com/expediagroup/streamplatform/streamregistry/it/StreamRegistryIT.java b/it/src/test/java/com/expediagroup/streamplatform/streamregistry/it/StreamRegistryIT.java index 3ec39a035..1c861c46e 100644 --- a/it/src/test/java/com/expediagroup/streamplatform/streamregistry/it/StreamRegistryIT.java +++ b/it/src/test/java/com/expediagroup/streamplatform/streamregistry/it/StreamRegistryIT.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2021 Expedia, Inc. + * Copyright (C) 2018-2023 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.junit.runners.Suite.SuiteClasses; import org.springframework.boot.SpringApplication; import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.util.SocketUtils; +import org.springframework.test.util.TestSocketUtils; import org.testcontainers.containers.KafkaContainer; import com.expediagroup.streamplatform.streamregistry.StreamRegistryApp; @@ -56,7 +56,7 @@ public class StreamRegistryIT { @BeforeClass public static void before() { - int port = SocketUtils.findAvailableTcpPort(); + int port = TestSocketUtils.findAvailableTcpPort(); log.info("Starting to run embedded spring app in port {}", port); diff --git a/pom.xml b/pom.xml index 9809e27ca..ee2cb2111 100644 --- a/pom.xml +++ b/pom.xml @@ -72,9 +72,9 @@ UTF-8 8 - 6.2.0 - 1.10.2 - 2.1.0 + 7.4.0 + 1.11.2 + 2.5.14 3.1.6 1.4.7.3 29.0-jre @@ -82,7 +82,7 @@ 14.0 1.7.10 1.7.26 - 2.7.0 + 3.1.4 1.15.3 2.17.1 diff --git a/repository/kafka/src/main/java/com/expediagroup/streamplatform/streamregistry/repository/kafka/KafkaConfiguration.java b/repository/kafka/src/main/java/com/expediagroup/streamplatform/streamregistry/repository/kafka/KafkaConfiguration.java index a27c3b221..33fe9a372 100644 --- a/repository/kafka/src/main/java/com/expediagroup/streamplatform/streamregistry/repository/kafka/KafkaConfiguration.java +++ b/repository/kafka/src/main/java/com/expediagroup/streamplatform/streamregistry/repository/kafka/KafkaConfiguration.java @@ -15,6 +15,18 @@ */ package com.expediagroup.streamplatform.streamregistry.repository.kafka; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + import com.expediagroup.streamplatform.streamregistry.state.DefaultEventCorrelator; import com.expediagroup.streamplatform.streamregistry.state.EntityView; import com.expediagroup.streamplatform.streamregistry.state.EntityViews; @@ -23,17 +35,6 @@ import com.expediagroup.streamplatform.streamregistry.state.internal.EventCorrelator; import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventReceiver; import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventSender; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; @Configuration public class KafkaConfiguration { diff --git a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityView.java b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityView.java index 1eb70d47a..d87c1c516 100644 --- a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityView.java +++ b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityView.java @@ -15,13 +15,8 @@ */ package com.expediagroup.streamplatform.streamregistry.state; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; -import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; -import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; -import lombok.Getter; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; -import lombok.val; +import static com.expediagroup.streamplatform.streamregistry.state.model.event.Event.LOAD_COMPLETE; +import static lombok.AccessLevel.PACKAGE; import java.util.Map; import java.util.Optional; @@ -30,8 +25,14 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static com.expediagroup.streamplatform.streamregistry.state.model.event.Event.LOAD_COMPLETE; -import static lombok.AccessLevel.PACKAGE; +import lombok.Getter; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.val; + +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; +import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; +import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; @RequiredArgsConstructor(access = PACKAGE) public class DefaultEntityView implements EntityView { diff --git a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdater.java b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdater.java index de6d0cb12..de0adb2ee 100644 --- a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdater.java +++ b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdater.java @@ -15,6 +15,17 @@ */ package com.expediagroup.streamplatform.streamregistry.state; +import static com.expediagroup.streamplatform.streamregistry.state.StateValue.deleted; +import static com.expediagroup.streamplatform.streamregistry.state.StateValue.existing; + +import java.util.Map; +import java.util.Optional; + +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import lombok.val; + import com.expediagroup.streamplatform.streamregistry.state.model.Entity; import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; import com.expediagroup.streamplatform.streamregistry.state.model.event.SpecificationDeletionEvent; @@ -23,16 +34,6 @@ import com.expediagroup.streamplatform.streamregistry.state.model.event.StatusEvent; import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; import com.expediagroup.streamplatform.streamregistry.state.model.status.DefaultStatus; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import lombok.val; - -import java.util.Map; -import java.util.Optional; - -import static com.expediagroup.streamplatform.streamregistry.state.StateValue.deleted; -import static com.expediagroup.streamplatform.streamregistry.state.StateValue.existing; @Slf4j @RequiredArgsConstructor diff --git a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdater.java b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdater.java index 772619a2b..3ad1b680e 100644 --- a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdater.java +++ b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdater.java @@ -15,12 +15,12 @@ */ package com.expediagroup.streamplatform.streamregistry.state; +import java.util.Optional; + import com.expediagroup.streamplatform.streamregistry.state.model.Entity; import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; -import java.util.Optional; - interface EntityViewUpdater { , S extends Specification> Optional> purge(K key); diff --git a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViews.java b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViews.java index f8ad4d8ca..e6ea2d321 100644 --- a/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViews.java +++ b/state/core/src/main/java/com/expediagroup/streamplatform/streamregistry/state/EntityViews.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

+ * * http://www.apache.org/licenses/LICENSE-2.0 - *

+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,14 +15,7 @@ */ package com.expediagroup.streamplatform.streamregistry.state; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; -import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; -import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; -import io.micrometer.core.instrument.MeterRegistry; -import io.micrometer.core.instrument.Tag; -import io.micrometer.core.instrument.Tags; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; +import static lombok.AccessLevel.PACKAGE; import java.util.Arrays; import java.util.Collections; @@ -30,7 +23,16 @@ import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; -import static lombok.AccessLevel.PACKAGE; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; + +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.Tag; +import io.micrometer.core.instrument.Tags; + +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; +import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; +import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; public final class EntityViews { diff --git a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdaterTest.java b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdaterTest.java index c5881db1a..2f0af068f 100644 --- a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdaterTest.java +++ b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/DefaultEntityViewUpdaterTest.java @@ -15,10 +15,10 @@ */ package com.expediagroup.streamplatform.streamregistry.state; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; - import java.util.Map; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; + public class DefaultEntityViewUpdaterTest extends EntityViewUpdaterTest { @Override public EntityViewUpdater entityViewUpdater(Map, StateValue> entities) { diff --git a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdaterTest.java b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdaterTest.java index 42ff199a2..54f87ef8d 100644 --- a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdaterTest.java +++ b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/EntityViewUpdaterTest.java @@ -15,19 +15,6 @@ */ package com.expediagroup.streamplatform.streamregistry.state; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity.DomainKey; -import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; -import com.expediagroup.streamplatform.streamregistry.state.model.specification.DefaultSpecification; -import com.expediagroup.streamplatform.streamregistry.state.model.status.DefaultStatus; -import lombok.val; -import org.junit.After; -import org.junit.Test; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; - import static com.expediagroup.streamplatform.streamregistry.state.SampleEntities.entity; import static com.expediagroup.streamplatform.streamregistry.state.SampleEntities.key; import static com.expediagroup.streamplatform.streamregistry.state.SampleEntities.specification; @@ -45,6 +32,21 @@ import static org.hamcrest.collection.IsMapWithSize.aMapWithSize; import static org.junit.Assert.assertThat; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import lombok.val; + +import org.junit.After; +import org.junit.Test; + +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity.DomainKey; +import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; +import com.expediagroup.streamplatform.streamregistry.state.model.specification.DefaultSpecification; +import com.expediagroup.streamplatform.streamregistry.state.model.status.DefaultStatus; + public abstract class EntityViewUpdaterTest { private final Map, StateValue> entities = new HashMap<>(); diff --git a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/MeteredEntityViewUpdaterTest.java b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/MeteredEntityViewUpdaterTest.java index 17b606dfd..d9d3a7498 100644 --- a/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/MeteredEntityViewUpdaterTest.java +++ b/state/core/src/test/java/com/expediagroup/streamplatform/streamregistry/state/MeteredEntityViewUpdaterTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

+ * * http://www.apache.org/licenses/LICENSE-2.0 - *

+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,21 +15,23 @@ */ package com.expediagroup.streamplatform.streamregistry.state; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; -import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; +import static com.expediagroup.streamplatform.streamregistry.state.SampleEntities.specificationEvent; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThrows; + +import java.util.Map; + import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.simple.SimpleMeterRegistry; + import org.junit.After; import org.junit.Test; -import java.util.Map; - -import static com.expediagroup.streamplatform.streamregistry.state.SampleEntities.specificationEvent; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThrows; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; +import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; public class MeteredEntityViewUpdaterTest extends EntityViewUpdaterTest { diff --git a/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgent.java b/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgent.java index b7f3b5f22..b7865b0e3 100644 --- a/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgent.java +++ b/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgent.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2021 Expedia, Inc. + * Copyright (C) 2018-2023 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,12 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; -import javax.annotation.PostConstruct; - import lombok.RequiredArgsConstructor; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.annotation.PostConstruct; + import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; diff --git a/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgentApp.java b/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgentApp.java index 4135cd22e..ec2ee3fd7 100644 --- a/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgentApp.java +++ b/state/example/src/main/java/com/expediagroup/streamplatform/streamregistry/state/example/ExampleAgentApp.java @@ -16,6 +16,12 @@ package com.expediagroup.streamplatform.streamregistry.state.example; import com.apollographql.apollo.ApolloClient; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + import com.expediagroup.streamplatform.streamregistry.state.EntityView; import com.expediagroup.streamplatform.streamregistry.state.EntityViews; import com.expediagroup.streamplatform.streamregistry.state.EventReceiver; @@ -24,10 +30,6 @@ import com.expediagroup.streamplatform.streamregistry.state.graphql.DefaultApolloClientFactory; import com.expediagroup.streamplatform.streamregistry.state.graphql.GraphQLEventSender; import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventReceiver; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; @SpringBootApplication public class ExampleAgentApp { diff --git a/state/graphql-sender/pom.xml b/state/graphql-sender/pom.xml index 3062900ba..12821aa7d 100644 --- a/state/graphql-sender/pom.xml +++ b/state/graphql-sender/pom.xml @@ -97,7 +97,7 @@ com.github.sparow199 apollo-client-maven-plugin - 3.1.0 + 3.3.1 graphql-generate-sources diff --git a/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/AgentIT.java b/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/AgentIT.java index c0fb2b44d..e14cfb206 100644 --- a/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/AgentIT.java +++ b/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/AgentIT.java @@ -15,40 +15,6 @@ */ package com.expediagroup.streamplatform.streamregistry.state.it; -import com.expediagroup.streamplatform.streamregistry.state.AgentData; -import com.expediagroup.streamplatform.streamregistry.state.EntityView; -import com.expediagroup.streamplatform.streamregistry.state.EntityViewListener; -import com.expediagroup.streamplatform.streamregistry.state.EntityViews; -import com.expediagroup.streamplatform.streamregistry.state.EventSender; -import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventReceiver; -import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventSender; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity.DomainKey; -import com.expediagroup.streamplatform.streamregistry.state.model.Entity.Key; -import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; -import com.expediagroup.streamplatform.streamregistry.state.model.specification.DefaultSpecification; -import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; -import io.micrometer.core.instrument.MeterRegistry; -import io.micrometer.core.instrument.simple.SimpleMeterRegistry; -import lombok.Getter; -import lombok.NonNull; -import lombok.SneakyThrows; -import lombok.val; -import org.apache.commons.lang3.tuple.Pair; -import org.awaitility.Awaitility; -import org.awaitility.core.ConditionFactory; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.testcontainers.containers.KafkaContainer; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; - import static com.expediagroup.streamplatform.streamregistry.state.AgentData.generateData; import static com.expediagroup.streamplatform.streamregistry.state.model.event.Event.specificationDeletion; import static java.util.UUID.randomUUID; @@ -63,6 +29,43 @@ import static org.hamcrest.core.IsIterableContaining.hasItem; import static org.hamcrest.core.IsIterableContaining.hasItems; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +import lombok.Getter; +import lombok.NonNull; +import lombok.SneakyThrows; +import lombok.val; + +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.simple.SimpleMeterRegistry; + +import org.apache.commons.lang3.tuple.Pair; +import org.awaitility.Awaitility; +import org.awaitility.core.ConditionFactory; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.testcontainers.containers.KafkaContainer; + +import com.expediagroup.streamplatform.streamregistry.state.AgentData; +import com.expediagroup.streamplatform.streamregistry.state.EntityView; +import com.expediagroup.streamplatform.streamregistry.state.EntityViewListener; +import com.expediagroup.streamplatform.streamregistry.state.EntityViews; +import com.expediagroup.streamplatform.streamregistry.state.EventSender; +import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventReceiver; +import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventSender; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity.DomainKey; +import com.expediagroup.streamplatform.streamregistry.state.model.Entity.Key; +import com.expediagroup.streamplatform.streamregistry.state.model.event.Event; +import com.expediagroup.streamplatform.streamregistry.state.model.specification.DefaultSpecification; +import com.expediagroup.streamplatform.streamregistry.state.model.specification.Specification; + public class AgentIT { private final MeterRegistry meterRegistry = new SimpleMeterRegistry(); diff --git a/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/StateIT.java b/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/StateIT.java index fc71bcf23..a83841d3c 100644 --- a/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/StateIT.java +++ b/state/it/src/test/java/com/expediagroup/streamplatform/streamregistry/state/it/StateIT.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Optional; -import com.expediagroup.streamplatform.streamregistry.state.EntityViews; import lombok.val; import com.fasterxml.jackson.databind.ObjectMapper; @@ -37,10 +36,10 @@ import org.junit.Test; import org.testcontainers.containers.KafkaContainer; -import com.expediagroup.streamplatform.streamregistry.state.DefaultEntityView; import com.expediagroup.streamplatform.streamregistry.state.DefaultEventCorrelator; import com.expediagroup.streamplatform.streamregistry.state.EntityView; import com.expediagroup.streamplatform.streamregistry.state.EntityViewListener; +import com.expediagroup.streamplatform.streamregistry.state.EntityViews; import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventReceiver; import com.expediagroup.streamplatform.streamregistry.state.kafka.KafkaEventSender; import com.expediagroup.streamplatform.streamregistry.state.model.Entity; diff --git a/state/kafka-sender/src/main/java/com/expediagroup/streamplatform/streamregistry/state/kafka/KafkaEventSender.java b/state/kafka-sender/src/main/java/com/expediagroup/streamplatform/streamregistry/state/kafka/KafkaEventSender.java index d09c17bbe..9bb217142 100644 --- a/state/kafka-sender/src/main/java/com/expediagroup/streamplatform/streamregistry/state/kafka/KafkaEventSender.java +++ b/state/kafka-sender/src/main/java/com/expediagroup/streamplatform/streamregistry/state/kafka/KafkaEventSender.java @@ -30,7 +30,6 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; -import com.expediagroup.streamplatform.streamregistry.state.Configurator; import lombok.Builder; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -46,6 +45,7 @@ import org.apache.kafka.common.header.Header; import org.apache.kafka.common.header.internals.RecordHeader; +import com.expediagroup.streamplatform.streamregistry.state.Configurator; import com.expediagroup.streamplatform.streamregistry.state.EventSender; import com.expediagroup.streamplatform.streamregistry.state.avro.AvroConverter; import com.expediagroup.streamplatform.streamregistry.state.avro.AvroKey;