fix tests

This commit is contained in:
Simon Willnauer 2015-12-09 10:36:25 +01:00
parent 3d946871e8
commit 83ef665cba
2 changed files with 3 additions and 2 deletions

View File

@ -94,7 +94,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards
}
public void setWeightFunction(float indexBalance, float shardBalanceFactor) {
weightFunction = new WeightFunction(indexBalance, weightFunction.shardBalance);
weightFunction = new WeightFunction(indexBalance, shardBalanceFactor);
}

View File

@ -101,8 +101,9 @@ public class UpdateThreadPoolSettingsTests extends ESTestCase {
);
fail("expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
assertEquals("illegal value can't update [threadpool.] from [{}] to [{" + threadPoolName + ".type=" + invalidThreadPoolType.getType() + "}]", e.getMessage());
assertThat(
e.getMessage(),
e.getCause().getMessage(),
is("setting threadpool." + threadPoolName + ".type to " + invalidThreadPoolType.getType() + " is not permitted; must be " + validThreadPoolType.getType()));
} finally {
terminateThreadPoolIfNeeded(threadPool);