Hi Community,
I am facing a runtime exception when I try to read from pubsub by Beam SQL
in JUnit tests (PR: https://github.com/apache/beam/pull/6006). The
exception is "Cannot create subscription because pipeline option 'project'
not specified". Based on existing JUnit tests which also read from pubsub
by Beam SQL, I added the following code to my build.gradle and it seems
didn't work. Is there someone who could know what's wrong in my .gradle
file?
task endToEndTest(type: Test) {
group = "Verification"
def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing'
def gcsTempRoot = project.findProperty('gcsTempRoot') ?:
'gs://temp-storage-for-end-to-end-tests/'
// Disable Gradle cache (it should not be used because the IT's won't run).
outputs.upToDateWhen { false }
def pipelineOptions = [
"--project=${gcpProject}",
"--tempLocation=${gcsTempRoot}",
"--blockOnRun=false"]
systemProperty "beamTestPipelineOptions", JsonOutput.toJson(pipelineOptions)
include '**/BeamSqlLineIT.class'
classpath =
project(":beam-sdks-java-extensions-sql-jdbc").sourceSets.test.runtimeClasspath
testClassesDirs =
files(project(":beam-sdks-java-extensions-sql-jdbc").sourceSets.test.output.classesDirs)
useJUnit { }
}
task postCommit {
group = "Verification"
description = "Various integration tests"
dependsOn endToEndTest
}
-Rui