From 370b8742744344fc38dabff4ae7bae65c9316dfc Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Sat, 18 Feb 2023 14:25:23 +0100 Subject: Predict best case overhead during autoscaling Predicting worst case has the unavoidable consequence that we will conclude we cannot fulfill requested resources in the case where there are no resource ranges (only node count ranges), or where they are too narrow, and thus refrain from scaling down when we should. Instead, mostly predict the best case and let the ideal < 1 headroom absorb the deficiency in what we are actually allocated. --- .../test/java/com/yahoo/search/yql/YqlParserTestCase.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'container-search') diff --git a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java index 33cd2f48d46..43aaba7b0f9 100644 --- a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java @@ -976,16 +976,9 @@ public class YqlParserTestCase { assertEquals(4, terms.size()); for (IndexedItem term : terms) { switch (term.getIndexedString()) { - case "a": - case "c": - assertFalse(((Item) term).isRanked()); - break; - case "b": - case "d": - assertTrue(((Item) term).isRanked()); - break; - default: - fail(); + case "a", "c" -> assertFalse(((Item) term).isRanked()); + case "b", "d" -> assertTrue(((Item) term).isRanked()); + default -> fail(); } } } -- cgit v1.2.3