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/06 14:20:07 UTC

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

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


##########
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:
   In full mode, you can add files to the target after running to test whether the increment is normal



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