[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2017-05-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user coveralls commented on the issue:

https://github.com/apache/flink/pull/991
  

[![Coverage 
Status](https://coveralls.io/builds/11380091/badge)](https://coveralls.io/builds/11380091)

Changes Unknown when pulling **fde7c49e04df7c5e7315a20594f65f2cd67fbc82 on 
HuangWHWHW:FLINK-2480** into ** on apache:master**.



> 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.0
>Reporter: Huang Wei
> Fix For: 1.0.0
>
>   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.15#6346)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138495322
  
Many thanks for your time!


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138486624
  
@HuangWHWHW You can use `System.lineSeparator()` to get the either `\n` or 
`\r\n` depending on the operating system.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138487709
  
Ah, smart!
Didn't notice it before.
I'll change.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138494607
  
Looks good. Will merge this later on.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138491813
  
@mxm 
Hi, added the System.lineSeparator().


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138547161
  
Ah, thank you.
I'll force push again.
Sorry for making you wait again.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138511026
  
@mxm
Hi, can you see why the CI failed?
I build success in local.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-138544981
  
The test failures are unrelated to your changes.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/1073


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-137746778
  
@mxm
Hi,
I change the "\r\n" to "\n" since it use println in 
PrintSinkFunction.invoke();


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/1073#discussion_r38621439
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -97,20 +76,43 @@ public void testPrintSinkStdErr(){
try {
printSink.open(new Configuration());
} catch (Exception e) {
-   e.printStackTrace();
+   Assert.fail();
}
printSink.setTargetToStandardErr();
printSink.invoke("hello world!");
 
assertEquals("Print to System.err", printSink.toString());
-   assertEquals("hello world!", stream.result);
+   assertEquals("hello world!\r\n", baos.toString());
 
printSink.close();
+   stream.close();
}
 
-   @Override
-   public void invoke(IN record) {
+   @Test
+   public void testPrintSinkWithPrefix(){
+   ByteArrayOutputStream baos = new ByteArrayOutputStream();
+   PrintStream stream = new PrintStream(baos);
+   System.setOut(stream);
+
+   final StreamingRuntimeContext ctx = 
Mockito.mock(StreamingRuntimeContext.class);
+   Mockito.when(ctx.getNumberOfParallelSubtasks()).thenReturn(2);
+   Mockito.when(ctx.getIndexOfThisSubtask()).thenReturn(1);
 
+   PrintSinkFunction printSink = new PrintSinkFunction<>();
+   printSink.setRuntimeContext(ctx);
+   try {
+   printSink.open(new Configuration());
+   } catch (Exception e) {
+   Assert.fail();
+   }
+   printSink.setTargetToStandardErr();
+   printSink.invoke("hello world!");
+
+   assertEquals("Print to System.err", printSink.toString());
+   assertEquals("2> hello world!\r\n", baos.toString());
--- End diff --

Same compatibility issue here.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/1073#discussion_r38621376
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -73,21 +51,22 @@ public void testPrintSinkStdOut(){
try {
printSink.open(new Configuration());
} catch (Exception e) {
-   e.printStackTrace();
+   Assert.fail();
}
printSink.setTargetToStandardOut();
printSink.invoke("hello world!");
 
assertEquals("Print to System.out", printSink.toString());
-   assertEquals("hello world!", stream.result);
+   assertEquals("hello world!\r\n", baos.toString());
--- End diff --

This will work on Windows (`\r\n` for newline) but not on Unix systems 
(`\n` for newline).


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/1073#discussion_r38621410
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -97,20 +76,43 @@ public void testPrintSinkStdErr(){
try {
printSink.open(new Configuration());
} catch (Exception e) {
-   e.printStackTrace();
+   Assert.fail();
}
printSink.setTargetToStandardErr();
printSink.invoke("hello world!");
 
assertEquals("Print to System.err", printSink.toString());
-   assertEquals("hello world!", stream.result);
+   assertEquals("hello world!\r\n", baos.toString());
--- End diff --

Same compatibility issue here.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136918945
  
@mxm @StephanEwen 
Hi, I fix the PrintStream.
And if I use the ByteArrayOutputStream baos = new ByteArrayOutputStream();, 
it will append "\r\n" in the end of print.
Does it matter?


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136916269
  
@mxm 
Much thanks!
I`ll take a fix.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

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.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136686857
  
·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.·

Hi @StephanEwen 
If I change this how can I get the printed message?
Since I use System.setOut(stream); to solve this before.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136677416
  
@StephanEwen 
Yes, thank you for the comments very much.
I`ll take the fix.
BTW:There are two PRs of mine that need someone to give some comments:
https://github.com/apache/flink/pull/1030
https://github.com/apache/flink/pull/992
Could you take a look?
Very sorry if it will spend your time.
Thanks a lot!


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136694516
  
@StephanEwen 
Hi, I take changes for all of your comments but this following:

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

I have no ideas to assert the print is correct.
So can you tell me in detail?
Thank you very much!


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-09-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136357113
  
Looks good to me.


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/1073#issuecomment-136361760
  
@mxm 
Thank you!
BTW:can you take a look about this 
PR:https://github.com/apache/flink/pull/992?
I add a new test in that PR and I`m not sure is it you need?


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


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-29 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user HuangWHWHW opened a pull request:

https://github.com/apache/flink/pull/1073

[FLINK-2480][test]add a test for Print Sink with prefix

I check the coverage of sink and add a test for sink to print with prefix.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/HuangWHWHW/flink FLINK-2480-new

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/1073.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1073


commit 13ac2aee58c6befbd79532a8a79647014501ea04
Author: HuangWHWHW 404823...@qq.com
Date:   2015-08-29T06:51:02Z

[FLINK-2480][test]add a test for Print Sink with prefix




 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-28 Thread Huang Wei (JIRA)

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

Huang Wei commented on FLINK-2480:
--

Sorry, didn`t see this before.
Yes, I plan to.
I will do some coverage check first.

 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-27 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r38076538
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public PrintStream printStreamOriginal = System.out;
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
--- End diff --

You can replace all this by `Mockito.mock(Environment.class)`.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-27 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r38076582
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public PrintStream printStreamOriginal = System.out;
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/991


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-135360612
  
Thank you @HuangWHWHW. I merged your pull request with a few minor changes 
(see new comments).


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-27 Thread Maximilian Michels (JIRA)

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

Maximilian Michels commented on FLINK-2480:
---

Do you want to add more tests here [~Huangwei]? If so, could you create sub 
tasks? If not, could you please rename the issue to add test for 
PrintSinkFunction? Its name is currently a bit broad.

 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37959743
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,330 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider 

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37961564
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,330 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider 

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37964105
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,336 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider 

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37974911
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public PrintStream PrintStreamOriginal = System.out;
--- End diff --

Changed public PrintStream PrintStreamOriginal = System.out; to private 
PrintStream printStreamOriginal = System.out; now.  :)


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37974619
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public PrintStream PrintStreamOriginal = System.out;
--- End diff --

AhAh..
Sorry, I get you now.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37962927
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,336 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider 

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37965403
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public PrintStream PrintStreamOriginal = System.out;
--- End diff --

By convention, this should be lower case here.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-135054171
  
@mxm 
Hi,
sorry for a careless again.
Now I fix the problem which the CI was failed.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-135062701
  
Thanks @HuangWHWHW. I'll merge your changes when Travis has completed.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-26 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-135261867
  
@mxm 
Hi,
the CI is pass.
Did it probability failure?


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user StephanEwen commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-134635720
  
@HuangWHWHW Can you access the CI reports now? Has the Travis team fixed 
the problem?


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37845122
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37845214
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }
+

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37847490
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   public class printStreamMock extends PrintStream{
+
+   public String result;
+
+   public printStreamMock(OutputStream out) {
+   super(out);
+   }
+
+   @Override
+   public void println(String x) {
+   this.result = x;
+   }
+   }
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() 

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-134565956
  
Thanks for the updates! Looks good and I think we can merge your changes.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37835967
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-134566835
  
@mxm 
Thank you.
Sorry for that I haven`t updated the code in this branch for a long time.
So you can wait the CI to pass.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-134781611
  
@StephanEwen 
Hi,
Not yet.
I will ask the travis support again.



 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-24 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37762004
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }
+

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-14 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37053652
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-14 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-130999180
  
Hi, I have done a new changes.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-13 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r37046489
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-13 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r36990804
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }
+

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-13 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r36990759
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.accumulators.AccumulatorRegistry;
+import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
+import org.apache.flink.runtime.execution.Environment;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.io.disk.iomanager.IOManager;
+import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider;
+import org.apache.flink.runtime.memorymanager.MemoryManager;
+import org.apache.flink.runtime.state.StateHandle;
+import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import org.apache.flink.streaming.runtime.tasks.StreamingRuntimeContext;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+/**
+ * Tests for the {@link 
org.apache.flink.streaming.api.functions.sink.PrintSinkFunction}.
+ */
+public class PrintSinkFunctionTestIN extends RichSinkFunctionIN {
+
+   private Environment envForPrefixNull = new Environment() {
+   @Override
+   public JobID getJobID() {
+   return null;
+   }
+
+   @Override
+   public JobVertexID getJobVertexId() {
+   return null;
+   }
+
+   @Override
+   public ExecutionAttemptID getExecutionId() {
+   return null;
+   }
+
+   @Override
+   public Configuration getTaskConfiguration() {
+   return null;
+   }
+
+   @Override
+   public TaskManagerRuntimeInfo getTaskManagerInfo() {
+   return null;
+   }
+
+   @Override
+   public Configuration getJobConfiguration() {
+   return null;
+   }
+
+   @Override
+   public int getNumberOfSubtasks() {
+   return 0;
+   }
+
+   @Override
+   public int getIndexInSubtaskGroup() {
+   return 0;
+   }
+
+   @Override
+   public InputSplitProvider getInputSplitProvider() {
+   return null;
+   }
+
+   @Override
+   public IOManager getIOManager() {
+   return null;
+   }
+
+   @Override
+   public MemoryManager getMemoryManager() {
+   return null;
+   }
+
+   @Override
+   public String getTaskName() {
+   return null;
+   }
+

[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-12 Thread ASF GitHub Bot (JIRA)

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

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

Github user mxm commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-130295740
  
Your pull request doesn't compile: 
https://s3.amazonaws.com/archive.travis-ci.org/jobs/74504427/log.txt


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-127982547
  
@fhueske 
Thank you!I`ll fix it.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-05 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r36284181
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,225 @@
+package org.apache.flink.streaming.api.functions;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.accumulators.Accumulator;
+//import org.apache.flink.api.common.functions.RuntimeContext;
--- End diff --

Please remove the imports which are commented 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-05 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/flink/pull/991#discussion_r36284223
  
--- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/PrintSinkFunctionTest.java
 ---
@@ -0,0 +1,225 @@
+package org.apache.flink.streaming.api.functions;
--- End diff --

Please add the Apache license header.


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-04 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user HuangWHWHW opened a pull request:

https://github.com/apache/flink/pull/990

[FLINK-2480][TEST]Add test for PrintSinkFunction

Test PrintSinkFunction:
set number of subtasks with 0 in runtime ctx to make prefix null.
1.set STD.OUT and test print system.out
2.set STD.ERR and test print system.err

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/HuangWHWHW/flink FLINK2480

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/990.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #990


commit 743d3876577b557e1141dc59421eea2e05af
Author: HuangWHWHW 404823...@qq.com
Date:   2015-08-05T02:33:46Z

[FLINK-2480][test]Add tests for PrintSinkFunction

commit c0ef0be6e8177f5604c8dba62e239d7dfc74e41d
Author: HuangWHWHW 404823...@qq.com
Date:   2015-08-05T02:36:52Z

[FLINK-2480][TEST]Add test for PrintSinkFunction




 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW commented on the pull request:

https://github.com/apache/flink/pull/991#issuecomment-127834382
  
I still cannot see the CI.
Does any one can help to support this CI info??


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user HuangWHWHW closed the pull request at:

https://github.com/apache/flink/pull/990


 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)


[jira] [Commented] (FLINK-2480) Improving tests coverage for org.apache.flink.streaming.api

2015-08-04 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user HuangWHWHW opened a pull request:

https://github.com/apache/flink/pull/991

[FLINK-2480][test]Add tests for PrintSinkFunction

Test PrintSinkFunction:
set number of subtasks with 0 in runtime ctx to make prefix null.
1.set STD.OUT and test print system.out
2.set STD.ERR and test print system.err

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/HuangWHWHW/flink FLINK-2480

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/991.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #991


commit cfd883deacfdd3bcbfc7b5da6f4ce23d2d21c04f
Author: HuangWHWHW 404823...@qq.com
Date:   2015-08-05T02:55:58Z

[FLINK-2480][test]Add tests for PrintSinkFunction




 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)