From 9352bfb014011ac2bb554887ea713bfc24c27859 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 4 Apr 2018 14:35:13 -0400 Subject: [PATCH] Fix indexing memory controller byte size tests There are a couple of tests here that were impacted by a change to the formatting of the error message when a byte size setting is out of range. This commit adjusts the assertions on these tests to accommodate the new error messages. --- .../elasticsearch/indices/IndexingMemoryControllerTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerTests.java b/server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerTests.java index 7abe1af74ba95..d4a35e93efad0 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerTests.java @@ -251,7 +251,7 @@ public void testNegativeMinIndexBufferSize() { Exception e = expectThrows(IllegalArgumentException.class, () -> new MockController(Settings.builder() .put("indices.memory.min_index_buffer_size", "-6mb").build())); - assertEquals("Failed to parse value [-6mb] for setting [indices.memory.min_index_buffer_size] must be >= 0b", e.getMessage()); + assertEquals("failed to parse value [-6mb] for setting [indices.memory.min_index_buffer_size], must be >= [0]", e.getMessage()); assertSettingDeprecationsAndWarnings(new Setting[0], "Values less than -1 bytes are deprecated and will not be supported in the next major version: [-6mb]"); } @@ -276,7 +276,7 @@ public void testNegativeMaxIndexBufferSize() { Exception e = expectThrows(IllegalArgumentException.class, () -> new MockController(Settings.builder() .put("indices.memory.max_index_buffer_size", "-6mb").build())); - assertEquals("Failed to parse value [-6mb] for setting [indices.memory.max_index_buffer_size] must be >= -1b", e.getMessage()); + assertEquals("failed to parse value [-6mb] for setting [indices.memory.max_index_buffer_size], must be >= [-1]", e.getMessage()); assertSettingDeprecationsAndWarnings(new Setting[0], "Values less than -1 bytes are deprecated and will not be supported in the next major version: [-6mb]"); }