apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tweise <...@git.apache.org>
Subject [GitHub] apex-malhar pull request #321: APEXMALHAR-2120 #resolve #comment solve probl...
Date Tue, 21 Jun 2016 04:53:29 GMT
Github user tweise commented on a diff in the pull request:

    https://github.com/apache/apex-malhar/pull/321#discussion_r67807860
  
    --- 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 --
    
    Tests should always delete in case it was leftover from previous run.


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