Skip to content

Commit

Permalink
fix linters
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdudas97 committed Sep 24, 2024
1 parent b0c1051 commit 5ce64a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ internal class EnvoyControlSynchronizationTest {
waitServiceOkAndFrom("echo", serviceLocal)
}


@Test
fun `should not synchronize blacklisted remote clusters`() {

Expand All @@ -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`() {
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 5ce64a3

Please sign in to comment.