akshayrai commented on a change in pull request #4777: [TE] add event driven 
scheduler
URL: https://github.com/apache/incubator-pinot/pull/4777#discussion_r344017254
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/anomaly/detection/trigger/DataAvailabilityTaskSchedulerTest.java
 ##########
 @@ -0,0 +1,214 @@
+package org.apache.pinot.thirdeye.anomaly.detection.trigger;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.pinot.thirdeye.anomaly.task.TaskConstants;
+import org.apache.pinot.thirdeye.datalayer.bao.DAOTestBase;
+import org.apache.pinot.thirdeye.datalayer.bao.DatasetConfigManager;
+import org.apache.pinot.thirdeye.datalayer.bao.DetectionConfigManager;
+import org.apache.pinot.thirdeye.datalayer.bao.MetricConfigManager;
+import org.apache.pinot.thirdeye.datalayer.bao.TaskManager;
+import org.apache.pinot.thirdeye.datalayer.dto.DatasetConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.DetectionConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.MetricConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.TaskDTO;
+import org.apache.pinot.thirdeye.datasource.DAORegistry;
+import org.apache.pinot.thirdeye.detection.DetectionPipelineTaskInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static 
org.apache.pinot.thirdeye.dashboard.resources.EntityManagerResource.*;
+
+
+public class DataAvailabilityTaskSchedulerTest {
+  private static final Logger LOG = 
LoggerFactory.getLogger(DataAvailabilityTaskSchedulerTest.class);
+  private static final long TEST_TIME = System.currentTimeMillis();
+  private static String TEST_DATASET_PREFIX = "ds_trigger_scheduler_";
+  private DAOTestBase testDAOProvider;
+  private DataAvailabilityTaskScheduler dataAvailabilityTaskScheduler;
+  private long metricId1;
+  private long metricId2;
+
+  @BeforeMethod
+  public void beforeMethod() {
+    testDAOProvider = DAOTestBase.getInstance();
+    MetricConfigManager metricConfigManager = 
DAORegistry.getInstance().getMetricConfigDAO();
+    final String TEST_METRIC_PREFIX = "metric_trigger_scheduler_";
+
+    MetricConfigDTO metric1 = new MetricConfigDTO();
+    metric1.setDataset(TEST_DATASET_PREFIX + 1);
+    metric1.setName(TEST_METRIC_PREFIX + 1);
+    metric1.setActive(true);
+    metric1.setDerived(false);
+    metric1.setAlias("");
 
 Review comment:
   I would prefer inserting something semantically valid or avoid populating 
altogether.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to