From 67fa4415f8b269ad67512c3e3a389ff3b989fd2e Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Thu, 7 Nov 2024 12:58:08 -0800 Subject: [PATCH] Moved unitTestCodec from src to tst folder to cleanup src files Signed-off-by: Navneet Verma --- .../META-INF/services/org.apache.lucene.codecs.Codec | 1 - .../META-INF.services/org.apache.lucene.codecs.Codec | 11 +++++++++++ .../knn/index/codec/KNN990Codec/UnitTestCodec.java | 5 +---- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 src/test/META-INF.services/org.apache.lucene.codecs.Codec rename src/{main => test}/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java (84%) diff --git a/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec b/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec index 7a8916981..0ac054339 100644 --- a/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec +++ b/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec @@ -8,4 +8,3 @@ org.opensearch.knn.index.codec.KNN940Codec.KNN940Codec org.opensearch.knn.index.codec.KNN950Codec.KNN950Codec org.opensearch.knn.index.codec.KNN990Codec.KNN990Codec org.opensearch.knn.index.codec.KNN9120Codec.KNN9120Codec -org.opensearch.knn.index.codec.KNN990Codec.UnitTestCodec diff --git a/src/test/META-INF.services/org.apache.lucene.codecs.Codec b/src/test/META-INF.services/org.apache.lucene.codecs.Codec new file mode 100644 index 000000000..ef1b36298 --- /dev/null +++ b/src/test/META-INF.services/org.apache.lucene.codecs.Codec @@ -0,0 +1,11 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. +# +# Modifications Copyright OpenSearch Contributors. See +# GitHub history for details. +# +org.opensearch.knn.index.codec.KNN990Codec.UnitTestCodec diff --git a/src/main/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java b/src/test/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java similarity index 84% rename from src/main/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java rename to src/test/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java index d651f410a..60c5c39c9 100644 --- a/src/main/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java +++ b/src/test/java/org/opensearch/knn/index/codec/KNN990Codec/UnitTestCodec.java @@ -16,10 +16,7 @@ import org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat; import org.opensearch.knn.index.codec.KNNCodecVersion; -/** - * This codec is for testing. The reason for putting this codec here is SPI is only scanning the src folder and not - * able to pick this class if its in test folder. Don't use this codec outside of testing - */ + public class UnitTestCodec extends FilterCodec { private static final Integer BUILD_GRAPH_ALWAYS = 0;