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

    https://github.com/apache/flink/pull/630#discussion_r29330901
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/operators/ProjectWithoutClassTest.java
 ---
    @@ -0,0 +1,22 @@
    +package org.apache.flink.streaming.api.operators;
    +
    +import org.apache.flink.api.common.functions.MapFunction;
    +import org.apache.flink.api.java.tuple.Tuple3;
    +import 
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
    +
    +public class ProjectWithoutClassTest {
    +
    +   public static void main(String[] args) throws Exception {
    +           final StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
    +
    +           env.generateSequence(1, 100).map(new MapFunction<Long, 
Tuple3<Long, Character, Double>>() {
    +
    +                   @Override
    +                   public Tuple3<Long, Character, Double> map(Long value) 
throws Exception {
    +                           return new Tuple3<Long, Character, 
Double>(value, 'c', (double) value);
    +                   }
    +           }).project(0,2).print();
    +
    +           env.execute("ProjectWithoutClassTest");
    +   }
    --- End diff --
    
    Wow, this test has a couple of problems:
    
      * Why create a separate file, not just have another function in 
`ProjectTest`?
      * Why start a `StreamExecutionEnvironment` instead of using `MockContext`?
      * Why print?
      * Why no assert?
    
    I'll assume it was just for internally making sure that the code "works", 
not really testing. :)


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to