[GitHub] flink pull request #6097: [FLINK-9470] Allow querying the key in KeyedProces...
Github user aljoscha closed the pull request at: https://github.com/apache/flink/pull/6097 ---
[GitHub] flink pull request #6097: [FLINK-9470] Allow querying the key in KeyedProces...
Github user kl0u commented on a diff in the pull request: https://github.com/apache/flink/pull/6097#discussion_r191460728 --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/KeyedProcessOperatorTest.java --- @@ -50,6 +52,30 @@ @Rule public ExpectedException expectedException = ExpectedException.none(); + @Test + public void testKeyQuerying() throws Exception { + + KeyedProcessOperator, String> operator = + new KeyedProcessOperator<>(new KeyQueryingProcessFunction()); + + OneInputStreamOperatorTestHarness, String> testHarness = + new KeyedOneInputStreamOperatorTestHarness<>(operator, (in) -> in.f0 , BasicTypeInfo.INT_TYPE_INFO); + --- End diff -- same here. ---
[GitHub] flink pull request #6097: [FLINK-9470] Allow querying the key in KeyedProces...
Github user kl0u commented on a diff in the pull request: https://github.com/apache/flink/pull/6097#discussion_r191460316 --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/KeyedProcessOperatorTest.java --- @@ -50,6 +52,30 @@ @Rule public ExpectedException expectedException = ExpectedException.none(); + @Test + public void testKeyQuerying() throws Exception { + + KeyedProcessOperator, String> operator = --- End diff -- The `OneInputStreamOperatorTestHarness` is `AutoCloseable` so I would recommend to go with ``` try(harness=...) { ... } ``` And remove the explicit call to `harness.close()`. This is a nice practice to start enforcing in new tests as it cleans up any leaks in case of exceptions and stuff. ---
[GitHub] flink pull request #6097: [FLINK-9470] Allow querying the key in KeyedProces...
GitHub user aljoscha opened a pull request: https://github.com/apache/flink/pull/6097 [FLINK-9470] Allow querying the key in KeyedProcessFunction R: @kl0u @zentol You can merge this pull request into a Git repository by running: $ git pull https://github.com/aljoscha/flink jira-9470-keyedprocessfunction-key Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6097.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 #6097 commit 0d3cccd546e782113a843df099fd5d8fe1880933 Author: Aljoscha Krettek Date: 2018-05-29T14:46:19Z [FLINK-9470] Allow querying the key in KeyedProcessFunction ---