eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anyway1021 <...@git.apache.org>
Subject [GitHub] incubator-eagle pull request #669: EAGLE-789: Add a new publisher to write a...
Date Fri, 18 Nov 2016 14:07:25 GMT
Github user anyway1021 commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/669#discussion_r88662451
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/publisher/AlertFilePublisherTest.java
---
    @@ -0,0 +1,44 @@
    +package org.apache.eagle.alert.engine.publisher;
    +
    +import org.apache.eagle.alert.engine.coordinator.Publishment;
    +import org.apache.eagle.alert.engine.model.AlertStreamEvent;
    +import org.apache.eagle.alert.engine.publisher.impl.AlertFilePublisher;
    +import org.junit.Test;
    +
    +import java.util.Arrays;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +public class AlertFilePublisherTest {
    +    private static final String TEST_POLICY_ID = "testPolicy";
    +
    +    @Test
    +    public void testAlertFilePublisher() throws Exception {
    +        Map<String, Object> properties = new HashMap<>();
    +        properties.put(PublishConstants.ROTATE_EVERY_KB, 1);
    +        properties.put(PublishConstants.NUMBER_OF_FILES, 1);
    +
    +        String property = "java.io.tmpdir";
    +        String tempDir = System.getProperty(property);
    +        System.out.println("OS current temporary directory is " + tempDir);
    +
    +        properties.put(PublishConstants.FILE_NAME, tempDir+"eagle-alert.log");
    --- End diff --
    
    Seems we need a system property "file.separator" between tempDir and "eagle-alert.log".
Please check it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message