/* * 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. */ package org.opensearch.ad.transport; import static org.opensearch.ad.settings.AnomalyDetectorSettings.BATCH_TASK_PIECE_INTERVAL_SECONDS; import static org.opensearch.ad.settings.AnomalyDetectorSettings.MAX_BATCH_TASK_PER_NODE; import java.time.Instant; import java.time.temporal.ChronoUnit; import org.junit.Before; import org.opensearch.ad.HistoricalAnalysisIntegTestCase; import org.opensearch.common.settings.Settings; public class ADTaskProfileTransportActionTests extends HistoricalAnalysisIntegTestCase { private Instant startTime; @Override @Before public void setUp() throws Exception { super.setUp(); startTime = Instant.now().minus(10, ChronoUnit.DAYS); ingestTestData(testIndex, startTime, detectionIntervalInMinutes, "error", 2000); createDetectorIndex(); } @Override protected Settings nodeSettings(int nodeOrdinal) { return Settings .builder() .put(super.nodeSettings(nodeOrdinal)) .put(BATCH_TASK_PIECE_INTERVAL_SECONDS.getKey(), 1) .put(MAX_BATCH_TASK_PER_NODE.getKey(), 1) .build(); } }