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 fa809be commit 20ea5df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class EnvoyEndpointsFactory(
}
val remaining = egressRouteSpecifications.filterIsInstance<StandardRouteSpecification>()
.mapNotNull { clusterLoadAssignments[it.clusterName] }
return (remaining + weighted).filter { it.endpointsList.isNotEmpty() }
return (remaining + weighted)
}

private fun assignWeights(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pl.allegro.tech.servicemesh.envoycontrol.routing

import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import pl.allegro.tech.servicemesh.envoycontrol.assertions.isFrom
Expand Down Expand Up @@ -129,7 +128,6 @@ class RoutingPolicyTest {
}

@Test
@Disabled
fun `should change routing when instance with prefered tag appears`() {
// given
val otherEchoId = consul.server.operations.registerService(
Expand Down Expand Up @@ -200,8 +198,7 @@ class RoutingPolicyTest {
}
}

@Test
@Disabled
@Test // todo remove logs
fun `should change routing when instance with prefered tag disappers`() {
// given
val ipsumId = consul.server.operations.registerService(
Expand Down

0 comments on commit 20ea5df

Please sign in to comment.