vincentchenjl commented on a change in pull request #4724: [TE] Add event
trigger listener for event driven scheduling
URL: https://github.com/apache/incubator-pinot/pull/4724#discussion_r338848512
##########
File path:
thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/anomaly/detection/trigger/TriggerEventListenerTest.java
##########
@@ -0,0 +1,138 @@
+package org.apache.pinot.thirdeye.anomaly.detection.trigger;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import
org.apache.pinot.thirdeye.anomaly.detection.trigger.filter.ActiveDatasetFilter;
+import org.apache.pinot.thirdeye.anomaly.detection.trigger.filter.OnTimeFilter;
+import
org.apache.pinot.thirdeye.anomaly.detection.trigger.filter.TriggerEventFilter;
+import
org.apache.pinot.thirdeye.anomaly.detection.trigger.utils.DatasetTriggerInfoRepo;
+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.dto.DatasetConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.DetectionConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.MetricConfigDTO;
+import org.apache.pinot.thirdeye.datasource.DAORegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+public class TriggerEventListenerTest {
+ private Logger LOG = LoggerFactory.getLogger(this.getClass());
+ static String TEST_DATA_SOURCE = "TestSource";
+ static String TEST_DATASET_PREFIX = "ds_trigger_listener_";
+ static String TEST_METRIC_PREFIX = "metric_trigger_listener_";
+ private DAOTestBase testDAOProvider;
+ private TriggerEventListener _triggerEventListener;
+
+ @BeforeClass
+ public void beforeCLass() {
+ testDAOProvider = DAOTestBase.getInstance();
+ DetectionConfigManager detectionConfigManager =
DAORegistry.getInstance().getDetectionConfigManager();
+ MetricConfigManager metricConfigManager =
DAORegistry.getInstance().getMetricConfigDAO();
+ DatasetConfigManager datasetConfigDAO =
DAORegistry.getInstance().getDatasetConfigDAO();
+
+ MetricConfigDTO metric1 = new MetricConfigDTO();
+ metric1.setDataset(TEST_DATASET_PREFIX + 1);
+ metric1.setName(TEST_METRIC_PREFIX + 1);
+ metric1.setActive(true);
+ metric1.setAlias("");
Review comment:
I guess i can just leave it blank, since the test is not using it anyways.
----------------------------------------------------------------
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]