From 00eb4f6b60df3b57b9081e02ed6b1d277f26d91c Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Tue, 9 Apr 2024 00:32:17 -0700 Subject: [PATCH] Fixing KNNCodecServiceTests as reported in the gh issue:[#1593] Signed-off-by: Navneet Verma --- CHANGELOG.md | 1 + .../org/opensearch/knn/index/codec/KNNCodecServiceTests.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e82376a6d1..6f101870a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Features ### Enhancements ### Bug Fixes +* Fixing KNNCodecServiceTests as reported in the gh issue:[#1593] []() ### Infrastructure ### Documentation ### Maintenance diff --git a/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java b/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java index 233b9adf77..dfe4e7f22a 100644 --- a/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java +++ b/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java @@ -36,6 +36,7 @@ public void setUp() throws Exception { super.setUp(); IndexMetadata indexMetadata = mock(IndexMetadata.class); when(indexMetadata.getIndex()).thenReturn(new Index(TEST_INDEX, INDEX_UUID.toString())); + when(indexMetadata.getCustomData(IndexMetadata.REMOTE_STORE_CUSTOM_KEY)).thenReturn(null); when(indexMetadata.getSettings()).thenReturn(Settings.EMPTY); Settings settings = Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, Integer.toString(NUM_OF_SHARDS)).build(); indexSettings = new IndexSettings(indexMetadata, settings);