[ 
https://issues.apache.org/jira/browse/FLINK-2480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725551#comment-14725551
 ] 

ASF GitHub Bot commented on FLINK-2480:
---------------------------------------

Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1073#issuecomment-136758616
  
    @HuangWHWHW Stephan is talking about something like this instead of the 
PrintStreamMock:
    
    ```java
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintStream captureStream = new PrintStream(baos);
    PrintStream original = System.out;
    System.setOut(captureStream);
    
    System.out.println("Printing one line");
    System.out.println("Another line");
    
    System.setOut(original);
    captureStream.close();
    
    Assert.equals("Printing one line\nAnotherline\n", baos.toString());
    ```
    
    You can see that we're using a `PrintStream` with a `ByteArrayOutputStream` 
here to capture the contents that are being printed to standard out.


> Improving tests coverage for org.apache.flink.streaming.api
> -----------------------------------------------------------
>
>                 Key: FLINK-2480
>                 URL: https://issues.apache.org/jira/browse/FLINK-2480
>             Project: Flink
>          Issue Type: Test
>          Components: Streaming
>    Affects Versions: 0.10
>            Reporter: Huang Wei
>             Fix For: 0.10
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> The streaming API is quite a bit newer than the other code so it is not that 
> well covered with tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to