tonytanger commented on code in PR #29127:
URL: https://github.com/apache/beam/pull/29127#discussion_r1376760252
##########
sdks/java/io/google-cloud-platform/build.gradle:
##########
@@ -187,12 +187,14 @@ task integrationTest(type: Test, dependsOn:
processTestResources) {
def gcpTempRoot = project.findProperty('gcpTempRoot') ?:
'gs://temp-storage-for-end-to-end-tests'
def firestoreDb = project.findProperty('firestoreDb') ?: 'firestoredb'
def host = project.findProperty('host') ?:
'batch-firestore.googleapis.com:443'
+ def instanceId = project.findProperty('instanceId') ?: 'beam-test'
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=DirectRunner",
"--project=${gcpProject}",
"--tempRoot=${gcpTempRoot}",
"--firestoreDb=${firestoreDb}",
"--host=${host}",
+ "--instanceId=${instanceId}",
Review Comment:
@Abacn Want to bring your attention here. I want to be able to run something
like this
```
./gradlew :sdks:java:io:google-cloud-platform:integrationTest
--tests=org.apache.beam.sdk.io.gcp.bigtable.changestreams.it.BigtableChangeStreamIT
-PgcpProject=my-test-project -PinstanceId=my-test-instance
```
`BigtableTestOptions` has a field `instanceId` but in order to pass a
specific string that's not the default string, the only that I found to do it
is by adding it here.
This works fine for ChangeStreamIT because it registers
`BigtableTestOptions` which defines `instanceId`, so we can pass `--instanceId`
to `beamTestPipelineOptions`. However, all other integration tests that do not
register `BigtableTestOptions` will fail because we are passing `--instanceId`
to `beamTestPipelineOptions` but they don't have an option that reigsters
`instanceId`.
That's why I moved the BigtableTestOptions to the main directory and
registered it by default.
Is there an alternative way to pass `instanceId` to my test that does not
require explicitly passing `instanceId` here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]