diff --git a/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/SynchronizationConfig.kt b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/SynchronizationConfig.kt index bafbec09c..27b1849e4 100644 --- a/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/SynchronizationConfig.kt +++ b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/SynchronizationConfig.kt @@ -61,22 +61,18 @@ class SynchronizationConfig { @Bean fun remoteClusters( - consulDatacenterReader: ConsulDatacenterReader, - properties: EnvoyControlProperties - ): RemoteClusters = - RemoteClusters( - consulDatacenterReader.knownDatacenters() - - consulDatacenterReader.localDatacenter() - - properties.sync.blackListedRemoteClusters - ) + consulDatacenterReader: ConsulDatacenterReader, properties: EnvoyControlProperties + ): RemoteClusters = RemoteClusters( + consulDatacenterReader.knownDatacenters() - + consulDatacenterReader.localDatacenter() - + properties.sync.blackListedRemoteClusters + ) @Bean fun instanceFetcher( - consulProperties: ConsulProperties, - envoyControlProperties: EnvoyControlProperties + consulProperties: ConsulProperties, envoyControlProperties: EnvoyControlProperties ) = SimpleConsulInstanceFetcher( - ConsulClient(consulProperties.host, consulProperties.port), - envoyControlProperties.sync.envoyControlAppName + ConsulClient(consulProperties.host, consulProperties.port), envoyControlProperties.sync.envoyControlAppName ) } diff --git a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/EnvoyControlSynchronizationTest.kt b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/EnvoyControlSynchronizationTest.kt index b5e5b2aa7..887d7992d 100644 --- a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/EnvoyControlSynchronizationTest.kt +++ b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/EnvoyControlSynchronizationTest.kt @@ -86,7 +86,6 @@ internal class EnvoyControlSynchronizationTest { waitServiceOkAndFrom("echo", serviceLocal) } - @Test fun `should not synchronize blacklisted remote clusters`() { @@ -99,8 +98,6 @@ internal class EnvoyControlSynchronizationTest { // when: instances from dc3 are absent envoy.waitForClusterEndpointNotHealthy("echo", serviceRemote3.container().ipAddress()) - - } @Test fun `latency between service registration in local dc and being able to access it via envoy should be less than 0,5s + stateSampleDuration`() { @@ -151,12 +148,6 @@ internal class EnvoyControlSynchronizationTest { } } - private fun waitServiceUnhealthy(name: String, echoServiceExtension: EchoServiceExtension) { - untilAsserted { - envoy.waitForClusterEndpointNotHealthy(name, echoServiceExtension.container().ipAddress()) - } - } - fun registerServiceInLocalDc(name: String, target: EchoServiceExtension): String { return consulClusters.serverFirst.operations.registerService(target, name = name) }