[
https://issues.apache.org/jira/browse/BEAM-6009?focusedWorklogId=168997&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-168997
]
ASF GitHub Bot logged work on BEAM-6009:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Nov/18 09:45
Start Date: 23/Nov/18 09:45
Worklog Time Spent: 10m
Work Description: mxm closed pull request #7077: [BEAM-6009] gradle
config for batch+streaming portable flink vr tests
URL: https://github.com/apache/beam/pull/7077
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy
b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Batch.groovy
similarity index 92%
rename from
.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy
rename to
.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Batch.groovy
index ad09a0ab53d..7aee97a20f2 100644
---
a/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink.groovy
+++
b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Batch.groovy
@@ -20,8 +20,8 @@ import CommonJobProperties as commonJobProperties
import PostcommitJobBuilder
// This job runs the suite of ValidatesRunner tests against the Flink runner.
-PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink',
- 'Run Java Flink PortableValidatesRunner', 'Java Flink
PortableValidatesRunner Tests', this) {
+PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink_Batch',
+ 'Run Java Flink PortableValidatesRunner Batch', 'Java Flink
PortableValidatesRunner Batch Tests', this) {
description('Runs the Java PortableValidatesRunner suite on the Flink
runner.')
// Set common parameters.
@@ -36,7 +36,7 @@
PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink',
steps {
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
- tasks(':beam-runners-flink_2.11-job-server:validatesPortableRunner')
+ tasks(':beam-runners-flink_2.11-job-server:validatesPortableRunnerBatch')
commonJobProperties.setGradleSwitches(delegate)
}
}
diff --git
a/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Streaming.groovy
b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Streaming.groovy
new file mode 100644
index 00000000000..c016a5fff5c
--- /dev/null
+++
b/.test-infra/jenkins/job_PostCommit_Java_PortableValidatesRunner_Flink_Streaming.groovy
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+import CommonJobProperties as commonJobProperties
+import PostcommitJobBuilder
+
+// This job runs the suite of ValidatesRunner tests against the Flink runner.
+PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink_Streaming',
+ 'Run Java Flink PortableValidatesRunner Streaming', 'Java Flink
PortableValidatesRunner Streaming Tests', this) {
+ description('Runs the Java PortableValidatesRunner suite on the Flink
runner.')
+
+ // Set common parameters.
+ commonJobProperties.setTopLevelMainJobProperties(delegate)
+
+ // Publish all test results to Jenkins
+ publishers {
+ archiveJunit('**/build/test-results/**/*.xml')
+ }
+
+ // Gradle goals for this job.
+ steps {
+ gradle {
+ rootBuildScriptDir(commonJobProperties.checkoutDir)
+
tasks(':beam-runners-flink_2.11-job-server:validatesPortableRunnerStreaming')
+ commonJobProperties.setGradleSwitches(delegate)
+ }
+ }
+}
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index d2a2a78a066..46c2392ea48 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -227,6 +227,8 @@ class BeamModulePlugin implements Plugin<Project> {
String jobServerConfig
// Number of parallel test runs.
Integer parallelism = 1
+ // Extra options to pass to TestPipeline
+ String[] pipelineOpts = []
// Categories for tests to run.
Closure testCategories = {
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
@@ -1475,11 +1477,9 @@ artifactId=${project.name}
def beamTestPipelineOptions = [
"--runner=org.apache.beam.runners.reference.testing.TestPortableRunner",
"--jobServerDriver=${config.jobServerDriver}",
- "--environmentCacheMillis=10000",
- // TODO Create two tasks to run for both batch and streaming:
- // https://issues.apache.org/jira/browse/BEAM-6009
- // "--streaming"
+ "--environmentCacheMillis=10000"
]
+ beamTestPipelineOptions.addAll(config.pipelineOpts)
if (config.jobServerConfig) {
beamTestPipelineOptions.add("--jobServerConfig=${config.jobServerConfig}")
}
diff --git a/runners/flink/job-server/build.gradle
b/runners/flink/job-server/build.gradle
index 93ab802493f..ffc8652b181 100644
--- a/runners/flink/job-server/build.gradle
+++ b/runners/flink/job-server/build.gradle
@@ -72,9 +72,21 @@ runShadow {
jvmArgs +=
["-Dorg.slf4j.simpleLogger.defaultLogLevel=${project.property('logLevel')}"]
}
-createPortableValidatesRunnerTask(
- jobServerDriver: "org.apache.beam.runners.flink.FlinkJobServerDriver",
- jobServerConfig:
"--clean-artifacts-per-job,--job-host=localhost,--job-port=0,--artifact-port=0",
- testClasspathConfiguration: configurations.validatesPortableRunner,
- parallelism: 2,
-)
+def portableValidatesRunnerTask(String name, Boolean streaming) {
+ createPortableValidatesRunnerTask(
+ name: "validatesPortableRunner${name}",
+ jobServerDriver:
"org.apache.beam.runners.flink.FlinkJobServerDriver",
+ jobServerConfig:
"--clean-artifacts-per-job,--job-host=localhost,--job-port=0,--artifact-port=0",
+ testClasspathConfiguration: configurations.validatesPortableRunner,
+ parallelism: 2,
+ pipelineOpts: streaming ? ["--streaming"] : []
+ )
+}
+
+project.ext.validatesPortableRunnerBatch =
portableValidatesRunnerTask("Batch", false)
+project.ext.validatesPortableRunnerStreaming =
portableValidatesRunnerTask("Streaming", true)
+
+task validatesPortableRunner() {
+ dependsOn validatesPortableRunnerBatch
+ dependsOn validatesPortableRunnerStreaming
+}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 168997)
Time Spent: 4.5h (was: 4h 20m)
> PortableValidatesRunner runs only in batch mode
> -----------------------------------------------
>
> Key: BEAM-6009
> URL: https://issues.apache.org/jira/browse/BEAM-6009
> Project: Beam
> Issue Type: Test
> Components: build-system, testing
> Reporter: Maximilian Michels
> Priority: Major
> Labels: portability, portability-flink
> Time Spent: 4.5h
> Remaining Estimate: 0h
>
> The PortableValidatesRunner tasks, e.g.
> {{:beam-runners-flink_2.11-job-server:validatesPortableRunner}} only runs in
> batch mode. Similar to the Python PortableValidatesRunner tests
> ({{:beam-sdks-python:flinkValidatesRunner}}, the test suite should also run
> with the {{--streaming}} flag.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)