From 6464cdae1854db2116ab2d5210e53a633163e66d Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 10 Oct 2024 12:43:05 -0700 Subject: [PATCH] Fixing existing test failures Signed-off-by: Ankit Jain --- .../core/service/categorizer/QueryShapeGeneratorTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGeneratorTests.java b/src/test/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGeneratorTests.java index f6b8f2a..f3eb25f 100644 --- a/src/test/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGeneratorTests.java +++ b/src/test/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGeneratorTests.java @@ -37,6 +37,7 @@ import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.hash.MurmurHash3; +import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.DistanceUnit; import org.opensearch.core.compress.CompressorRegistry; import org.opensearch.core.index.Index; @@ -65,6 +66,7 @@ public final class QueryShapeGeneratorTests extends OpenSearchTestCase { public QueryShapeGeneratorTests() { CompressorRegistry.defaultCompressor(); this.mockClusterService = mock(ClusterService.class); + when(mockClusterService.getSettings()).thenReturn(Settings.EMPTY); this.mockClusterState = mock(ClusterState.class); this.mockMetaData = mock(Metadata.class); this.queryShapeGenerator = new QueryShapeGenerator(mockClusterService);