nevillelyh commented on a change in pull request #12564: URL: https://github.com/apache/beam/pull/12564#discussion_r470145753
########## File path: runners/flink/1.11/src/test/java/org/apache/beam/runners/flink/FlinkRunnerTest.java ########## @@ -0,0 +1,100 @@ +/* + * 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.beam.runners.flink; + +import static org.hamcrest.CoreMatchers.allOf; + +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.PipelineResult; +import org.apache.beam.sdk.io.GenerateSequence; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.beam.sdk.options.PipelineOptionsFactory; +import org.apache.flink.client.program.OptimizerPlanEnvironment; +import org.apache.flink.client.program.PackagedProgram; +import org.apache.flink.client.program.PackagedProgramUtils; +import org.apache.flink.client.program.ProgramInvocationException; +import org.apache.flink.configuration.Configuration; +import org.hamcrest.MatcherAssert; +import org.hamcrest.core.StringContains; +import org.junit.Assert; +import org.junit.Test; + +/** + * Test for {@link FlinkRunner}. + * + * <p>This test is copied to 1.10 is becauses the signature of the method getPipeline in + * OptimizerPlanEnvironment has been changed in Flink 1.10, please refer to + * https://github.com/apache/flink/commit/0ea4dd7e9d56a017743ca6794d28537800faab6f for more details. + */ +public class FlinkRunnerTest { Review comment: @mxm addressed most code copy issues by adding compat layers. `./gradlew -p runners/flink test` passes for all versions but `build` fails checkstyle due to missing `package-info.java`, even though it exists in the base `src/main` dir. Any idea how to fix? I'll look at the docs next. Not sure about the CI test scripts though. ``` > Task :runners:flink:1.10:checkstyleMain FAILED [ant:checkstyle] [ERROR] /home/neville/src/apache/beam/runners/flink/1.10/build/source-overrides/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/AbstractStreamOperatorCompat.java:1: Missing package-info.java file. [JavadocPackage] > Task :runners:flink:1.8:checkstyleMain FAILED [ant:checkstyle] [ERROR] /home/neville/src/apache/beam/runners/flink/1.8/build/source-overrides/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/AbstractStreamOperatorCompat.java:1: Missing package-info.java file. [JavadocPackage] > Task :runners:flink:1.9:checkstyleMain [ant:checkstyle] [ERROR] /home/neville/src/apache/beam/runners/flink/1.9/build/source-overrides/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/AbstractStreamOperatorCompat.java:1: Missing package-info.java file. [JavadocPackage] > Task :runners:flink:1.9:checkstyleMain FAILED > Task :runners:flink:1.11:checkstyleMain [ant:checkstyle] [ERROR] /home/neville/src/apache/beam/runners/flink/1.11/build/source-overrides/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/AbstractStreamOperatorCompat.java:1: Missing package-info.java file. [JavadocPackage] ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
