blob: 86d01e58a9e609caf90daef27fa68d73646d987f [file] [log] [blame]
/*
* 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 groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.runners.twister2',
enableChecker: false,
ignoreRawtypeErrors: true)
evaluationDependsOn(":sdks:java:core")
configurations {
validatesRunner
}
description = "Apache Beam :: Runners :: Twister2"
def twister2_version = '0.6.0'
dependencies {
compile library.java.vendored_guava_26_0_jre
compile (project(path: ":runners:core-java")){
exclude group: 'com.esotericsoftware.kryo', module: 'kryo'
}
compile project(":runners:java-fn-execution")
compile "org.twister2:api-java:$twister2_version"
compile "org.twister2:tset-api-java:$twister2_version"
compile "org.twister2:tset-java:$twister2_version"
compile "org.twister2:resource-scheduler-java:$twister2_version"
compile "org.twister2:local-runner-java:$twister2_version"
testCompile library.java.junit
validatesRunner (project(path: ":sdks:java:core", configuration: "shadowTest")){
exclude group: 'com.esotericsoftware.kryo', module: 'kryo'
}
validatesRunner (project(path: ":runners:core-java", configuration: "testRuntime")){
exclude group: 'com.esotericsoftware.kryo', module: 'kryo'
}
validatesRunner (project(project.path)){
exclude group: 'asm', module: 'asm'
}
}
task validatesRunnerBatch(type: Test) {
group = "Verification"
def pipelineOptions = JsonOutput.toJson([
"--runner=Twister2TestRunner",
])
systemProperty "beamTestPipelineOptions", pipelineOptions
classpath = configurations.validatesRunner
testClassesDirs += files(project(":sdks:java:core").sourceSets.test.output.classesDirs)
testClassesDirs += files(project.sourceSets.test.output.classesDirs)
forkEvery 1
useJUnit {
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
excludeCategories 'org.apache.beam.sdk.testing.FlattenWithHeterogeneousCoders'
excludeCategories 'org.apache.beam.sdk.testing.UsesStatefulParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesTimersInParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesUnboundedSplittableParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesAttemptedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesCommittedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesTestStream'
excludeCategories 'org.apache.beam.sdk.testing.UsesImpulse'
excludeCategories 'org.apache.beam.sdk.testing.UsesMetricsPusher'
excludeCategories 'org.apache.beam.sdk.testing.UsesBundleFinalizer'
}
maxHeapSize = '6g'
}
task validatesRunner {
group = "Verification"
description "Validates Twister2 Runner"
dependsOn validatesRunnerBatch
}