Skip to content

Commit

Permalink
Merge pull request apache#6592: [BEAM-4176] Enable Post Commit JAVA P…
Browse files Browse the repository at this point in the history
…VR tests for Flink
  • Loading branch information
tweise authored Oct 16, 2018
2 parents 00e4964 + ae34c93 commit 3e7e034
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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',
'Run Java Flink PortableValidatesRunner', 'Java Flink PortableValidatesRunner 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:validatesPortableRunner')
commonJobProperties.setGradleSwitches(delegate)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ artifactId=${project.name}
testClassesDirs = project.files(project.project(":beam-sdks-java-core").sourceSets.test.output.classesDirs, project.project(":beam-runners-core-java").sourceSets.test.output.classesDirs)
maxParallelForks config.parallelism
useJUnit(config.testCategories)
dependsOn ':beam-sdks-java-container:docker'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ public void run() {
}
}

public String start() throws IOException {
jobServer = createJobServer();
return jobServer.getApiServiceDescriptor().getUrl();
}

public void stop() {
if (jobServer != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private void scheduleRelease(JobInfo jobInfo) {
int environmentCacheTTLMillis =
pipelineOptions.as(PortablePipelineOptions.class).getEnvironmentCacheMillis();
if (environmentCacheTTLMillis > 0) {
// Do immediate cleanup if this class is not loaded on Flink parent classloader.
if (this.getClass().getClassLoader() != ExecutionEnvironment.class.getClassLoader()) {
LOG.warn(
"{} is not loaded on parent Flink classloader. "
Expand Down

0 comments on commit 3e7e034

Please sign in to comment.