From 95a4e699bfae8bf3d8df11f3b95a81ad4b9291a2 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 18 Aug 2014 19:55:20 +0200 Subject: [PATCH] [TEST] Don't invoke RoutingNodes.assertShardStats() via asserts many times in tests, just once on each reroute call. --- .../java/org/elasticsearch/cluster/routing/RoutingNodes.java | 1 - .../cluster/routing/allocation/AllocationService.java | 1 - 2 files changed, 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java b/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java index c22a05d2f10..5744f59fdd6 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java +++ b/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java @@ -513,7 +513,6 @@ public class RoutingNodes implements Iterable { if (routingNode == null) { return null; } - assert assertShardStats(this); return new RoutingNodeIterator(routingNode); } diff --git a/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java b/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java index 603ee7b8570..c6ce355a183 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java +++ b/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java @@ -261,7 +261,6 @@ public class AllocationService extends AbstractComponent { if (!moved) { logger.debug("[{}][{}] can't move", shardRouting.index(), shardRouting.id()); } else { - assert RoutingNodes.assertShardStats(allocation.routingNodes()); changed = true; } }