Skip to content

Commit

Permalink
add UT
Browse files Browse the repository at this point in the history
Signed-off-by: Kaushal Kumar <[email protected]>
  • Loading branch information
kaushalmahi12 committed Oct 17, 2024
1 parent 9397a1d commit ff9a37b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import org.opensearch.common.settings.SettingsModule;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.core.common.io.stream.NamedWriteableRegistry;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.gateway.GatewayAllocator;
import org.opensearch.plugins.ClusterPlugin;
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
Expand Down Expand Up @@ -331,10 +332,16 @@ public void testRejectsDuplicateExistingShardsAllocatorName() {

public void testQueryGroupMetadataRegister() {
List<NamedWriteableRegistry.Entry> customEntries = ClusterModule.getNamedWriteables();
List<NamedXContentRegistry.Entry> customXEntries = ClusterModule.getNamedXWriteables();
assertTrue(
customEntries.stream()
.anyMatch(entry -> entry.categoryClass == Metadata.Custom.class && entry.name.equals(QueryGroupMetadata.TYPE))
);

assertTrue(
customXEntries.stream()
.anyMatch(entry -> entry.categoryClass == Metadata.Custom.class && entry.name.getPreferredName().equals(QueryGroupMetadata.TYPE))
);
}

public void testRerouteServiceSetForBalancedShardsAllocator() {
Expand Down

0 comments on commit ff9a37b

Please sign in to comment.