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

    https://github.com/apache/apex-malhar/pull/321#discussion_r67763344
  
    --- Diff: 
kafka/src/test/java/org/apache/apex/malhar/kafka/KafkaInputOperatorTest.java ---
    @@ -68,26 +70,53 @@
     
       public static String APPLICATION_PATH = baseDir + File.separator + 
StramLocalCluster.class.getName() + File.separator;
     
    +  public class KafkaTestInfo extends TestWatcher
    +  {
    +    public org.junit.runner.Description desc;
    +
    +    public String getDir()
    +    {
    +      String methodName = desc.getMethodName();
    +      String className = desc.getClassName();
    +      return "target/" + className + "/" + methodName + "/" + testName;
    +    }
    +
    +    @Override
    +    protected void starting(org.junit.runner.Description description)
    +    {
    +      this.desc = description;
    +    }
    +  }
    +  
    +  @Rule
    +  public final KafkaTestInfo testInfo = new KafkaTestInfo();
    +  
    +  
       @Parameterized.Parameters(name = "multi-cluster: {0}, multi-partition: 
{1}, partition: {2}")
       public static Collection<Object[]> testScenario()
       {
    -    return Arrays.asList(new Object[][]{{true, false, "one_to_one"},// 
multi cluster with single partition
    +    return Arrays.asList(new Object[][]{
    +      {true, false, "one_to_one"},// multi cluster with single partition
           {true, false, "one_to_many"},
           {true, true, "one_to_one"},// multi cluster with multi partitions
    -      {true, true, "one_to_many"},
    +      {true, true, "one_to_many"},   //test failed, no data received.
           {false, true, "one_to_one"}, // single cluster with multi partitions
    -      {false, true, "one_to_many"},
    +      {false, true, "one_to_many"},  //test failed, no data received.
           {false, false, "one_to_one"}, // single cluster with single 
partitions
           {false, false, "one_to_many"}
         });
       }
     
    +
    +
       @Before
       public void before()
       {
    -    FileUtils.deleteQuietly(new File(APPLICATION_PATH));
    -    tupleCollection.clear();
    +    //FileUtils.deleteQuietly(new File(APPLICATION_PATH));
    --- End diff --
    
    The different test case/test Scenario use difference directory. So it is 
not necessary to delete the directory


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to