Skip to content

Commit fcc6449

Browse files
committed
comments
1 parent d1be8b3 commit fcc6449

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/test/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceComputerTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ public void testAppliesMoveCommands() {
574574
var desiredBalanceComputer = createDesiredBalanceComputer(new ShardsAllocator() {
575575
@Override
576576
public void allocate(RoutingAllocation allocation) {
577+
// This runs after the move commands have been applied, we assert that the relocating shards caused by the move
578+
// commands are all started by the simulation.
577579
assertThat(
578580
"unexpected relocating shards: " + allocation.routingNodes(),
579581
allocation.routingNodes().getRelocatingShardCount(),
@@ -637,6 +639,8 @@ public void testCannotApplyMoveCommand() {
637639
var desiredBalanceComputer = createDesiredBalanceComputer(new ShardsAllocator() {
638640
@Override
639641
public void allocate(RoutingAllocation allocation) {
642+
// This runs after the move commands have been executed and failed, we assert that no movement should be seen
643+
// in the routing nodes.
640644
assertThat(
641645
"unexpected relocating shards: " + allocation.routingNodes(),
642646
allocation.routingNodes().getRelocatingShardCount(),

0 commit comments

Comments
 (0)