Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1073#issuecomment-136667496
  
    @HuangWHWHW 
    
    I think this test and also the class `PrintSinkFunctionTest` needs some 
more improvement. Here are a few comments:
    
      - Exception during `open()` should not be caught, but should fail the 
test. This happens at multiple points in the code.
      - The test contains a class that starts with a lower case letter, which 
is against the Java style rules.
      - The test as a whole extends `RichSinkFunction` which is not necessary 
and seems strange.
      - The mock print stream overwrites only one `println()` function, which 
makes it susceptible to changes in the sink. It is better to use a regular 
`PrintStream` that prints to a `StringWriter` to collect all contents.


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