Skip to content

Commit

Permalink
Implemented locality weighted load balancing (fixed tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
nastassia-dailidava committed Jan 15, 2024
1 parent 2eaef05 commit b931c3e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import pl.allegro.tech.servicemesh.envoycontrol.utils.EGRESS_HOST
import pl.allegro.tech.servicemesh.envoycontrol.utils.EGRESS_PORT
import pl.allegro.tech.servicemesh.envoycontrol.utils.INGRESS_HOST
import pl.allegro.tech.servicemesh.envoycontrol.utils.INGRESS_PORT
import pl.allegro.tech.servicemesh.envoycontrol.utils.TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE
import pl.allegro.tech.servicemesh.envoycontrol.utils.createCluster
import pl.allegro.tech.servicemesh.envoycontrol.utils.createClusterConfigurations
import pl.allegro.tech.servicemesh.envoycontrol.utils.createEndpoints
Expand All @@ -56,13 +55,6 @@ class EnvoySnapshotFactoryTest {
const val SERVICE_NAME_2 = "service-name-2"
}

private val snapshotPropertiesWithWeights = SnapshotProperties().also {
it.loadBalancing.trafficSplitting.serviceByWeightsProperties = mapOf(
DEFAULT_SERVICE_NAME to DEFAULT_CLUSTER_WEIGHTS
)
it.loadBalancing.trafficSplitting.zoneName = TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE
}

@Test
fun shouldGetSnapshotListenersForGroupWhenDynamicListenersEnabled() {
// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import pl.allegro.tech.servicemesh.envoycontrol.snapshot.GlobalSnapshot
import pl.allegro.tech.servicemesh.envoycontrol.snapshot.SnapshotProperties
import pl.allegro.tech.servicemesh.envoycontrol.utils.CLUSTER_NAME1
import pl.allegro.tech.servicemesh.envoycontrol.utils.CLUSTER_NAME2
import pl.allegro.tech.servicemesh.envoycontrol.utils.DEFAULT_CLUSTER_WEIGHTS
import pl.allegro.tech.servicemesh.envoycontrol.utils.DEFAULT_SERVICE_NAME
import pl.allegro.tech.servicemesh.envoycontrol.utils.TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE
import pl.allegro.tech.servicemesh.envoycontrol.utils.createAllServicesGroup
import pl.allegro.tech.servicemesh.envoycontrol.utils.createCluster
import pl.allegro.tech.servicemesh.envoycontrol.utils.createClusterConfigurations
Expand All @@ -24,12 +21,6 @@ internal class EnvoyClustersFactoryTest {

companion object {
private val factory = EnvoyClustersFactory(SnapshotProperties())
private val snapshotPropertiesWithWeights = SnapshotProperties().apply {
loadBalancing.trafficSplitting.serviceByWeightsProperties = mapOf(
DEFAULT_SERVICE_NAME to DEFAULT_CLUSTER_WEIGHTS
)
loadBalancing.trafficSplitting.zoneName = TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ internal class EnvoyEndpointsFactoryTest {

private val serviceName = "service-one"

private val secondaryClusterName = "service-one-secondary"

private val serviceName2 = "service-two"

private val defaultWeights = zoneWeights(50, 50)
Expand Down

0 comments on commit b931c3e

Please sign in to comment.