Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2633#discussion_r184711553
  
    --- Diff: 
external/storm-hdfs/src/test/java/org/apache/storm/hdfs/spout/TestHdfsSpout.java
 ---
    @@ -153,6 +153,35 @@ public void testSimpleText_ACK() throws Exception {
             }
         }
     
    +    @Test
    +    public void testEmptySimpleText_ACK() throws Exception {
    +        Path file1 = new Path(source.toString() + "/file_empty.txt");
    +        createTextFile(file1, 0);
    +
    +        Path file2 = new Path(source.toString() + "/file.txt");
    +        createTextFile(file2, 5);
    +
    +        try (AutoCloseableHdfsSpout closeableSpout = 
makeSpout(Configs.TEXT, TextFileReader.defaultFields)) {
    +            HdfsSpout spout = closeableSpout.spout;
    +            spout.setCommitFrequencyCount(1);
    +            spout.setCommitFrequencySec(1);
    +
    +            Map<String, Object> conf = getCommonConfigs();
    +            conf.put(Config.TOPOLOGY_ACKER_EXECUTORS, "1"); // enable 
ACKing
    +            openSpout(spout, 0, conf);
    +
    +            // consume empty file
    +            runSpout(spout, "r6");
    --- End diff --
    
    Nit: Isn't it enough to call nextTuple once rather than 6 times here?


---

Reply via email to