Skip to content

Commit

Permalink
reverting removal of overrides of AnomalYDetectorRestTestCase
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Palis <[email protected]>
  • Loading branch information
joshpalis committed May 26, 2023
1 parent b3adb76 commit 0bf30f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/opensearch/ad/AnomalyDetectorRestTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.common.Strings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.xcontent.LoggingDeprecationHandler;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentParserUtils;
Expand All @@ -59,6 +60,16 @@ public abstract class AnomalyDetectorRestTestCase extends ODFERestTestCase {

public static final int MAX_RETRY_TIMES = 10;

@Override
protected NamedXContentRegistry xContentRegistry() {
return new NamedXContentRegistry(ImmutableList.of(AnomalyDetector.XCONTENT_REGISTRY));
}

@Override
protected Settings restClientSettings() {
return super.restClientSettings();
}

protected AnomalyDetector createRandomAnomalyDetector(Boolean refresh, Boolean withMetadata, String indexName, SDKRestClient client)
throws IOException {
return createRandomAnomalyDetector(refresh, withMetadata, client, true, indexName);
Expand Down

0 comments on commit 0bf30f3

Please sign in to comment.