You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/05 23:10:07 UTC

[GitHub] [incubator-inlong] EMsnap commented on a diff in pull request #4404: [INLONG-4397][Agent] Supports collect of full data for file type

EMsnap commented on code in PR #4404:
URL: https://github.com/apache/incubator-inlong/pull/4404#discussion_r889748137


##########
inlong-agent/agent-plugins/src/test/java/org/apache/inlong/agent/plugin/TestFileAgent.java:
##########
@@ -144,6 +146,21 @@ public void testOneJobOnly() throws Exception {
         Assert.assertTrue(checkOnlyOneJob());
     }
 
+    // @Test
+    public void testOneJobFullPath() throws Exception {
+        String jsonString = TestUtils.getTestTriggerProfile();
+        TriggerProfile triggerProfile = TriggerProfile.parseJsonStr(jsonString);
+        triggerProfile.set(JOB_DIR_FILTER_PATTERN,
+                Paths.get(getClass().getClassLoader().getResource("test").toURI()).toString());
+        triggerProfile.set(JOB_FILE_MAX_WAIT, "-1");
+        triggerProfile.set(JOB_FILE_COLLECT_TYPE, FileCollectType.FULL);
+        TriggerManager triggerManager = agent.getManager().getTriggerManager();
+        triggerManager.addTrigger(triggerProfile);
+        while (true) {

Review Comment:
   what's the purpose of this code 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org