beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goe...@apache.org
Subject [beam] branch master updated: [BEAM-9287] Add Python Streaming Validates runner tests for Unified Worker
Date Wed, 19 Feb 2020 22:58:28 GMT
This is an automated email from the ASF dual-hosted git repository.

goenka pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new e2d1598  [BEAM-9287] Add Python Streaming Validates runner tests for Unified Worker
     new 96b2d90  Merge pull request #10863 from angoenka/uw_vr
e2d1598 is described below

commit e2d15981d6ea467a5a6ec88b62d9c2bc6d084cfe
Author: Ankur Goenka <ankurgoenka@gmail.com>
AuthorDate: Mon Feb 10 13:51:39 2020 -0800

    [BEAM-9287] Add Python Streaming Validates runner tests for Unified Worker
---
 sdks/python/scripts/run_integration_test.sh       | 11 +++++++++++
 sdks/python/test-suites/dataflow/py2/build.gradle | 17 +++++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/sdks/python/scripts/run_integration_test.sh b/sdks/python/scripts/run_integration_test.sh
index 0804ace..a99930d 100755
--- a/sdks/python/scripts/run_integration_test.sh
+++ b/sdks/python/scripts/run_integration_test.sh
@@ -126,6 +126,11 @@ case $key in
         shift # past argument
         shift # past value
         ;;
+    --runner_v2)
+        RUNNER_V2="$2"
+        shift # past argument
+        shift # past value
+        ;;
     --kms_key_name)
         KMS_KEY_NAME="$2"
         shift # past argument
@@ -223,6 +228,12 @@ if [[ -z $PIPELINE_OPTS ]]; then
     opts+=("--dataflow_worker_jar=$WORKER_JAR")
   fi
 
+  # Add --runner_v2 if provided
+  if [[ "$RUNNER_V2" = true ]]; then
+    opts+=("--experiments=use_runner_v2")
+    opts+=("--enable_streaming_engine")
+  fi
+
   if [[ ! -z "$KMS_KEY_NAME" ]]; then
     opts+=(
       "--kms_key_name=$KMS_KEY_NAME"
diff --git a/sdks/python/test-suites/dataflow/py2/build.gradle b/sdks/python/test-suites/dataflow/py2/build.gradle
index 248f71d..ec9345b 100644
--- a/sdks/python/test-suites/dataflow/py2/build.gradle
+++ b/sdks/python/test-suites/dataflow/py2/build.gradle
@@ -118,14 +118,19 @@ task validatesRunnerStreamingTests {
 
   def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath
 
+  def testOpts = basicTestOpts + ["--attr=ValidatesRunner,!sickbay-streaming"]
+  def argMap = ["test_opts": testOpts,
+                "streaming": "true",
+                "worker_jar": dataflowWorkerJar,
+                "sdk_location": files(configurations.distTarBall.files).singleFile,
+                "suite": "validatesRunnerStreamingTests-df"]
+  if (project.hasProperty('useRunnerV2'))
+    argMap.put("runner_v2", "true")
+    // KMS is not supported for streaming engine.
+    argMap.put("kms_key_name", "")
+
   doLast {
     // TODO(BEAM-3544,BEAM-5025): Disable tests with 'sickbay-streaming' tag.
-    def testOpts = basicTestOpts + ["--attr=ValidatesRunner,!sickbay-streaming"]
-    def argMap = ["test_opts": testOpts,
-                  "streaming": "true",
-                  "worker_jar": dataflowWorkerJar,
-                  "sdk_location": files(configurations.distTarBall.files).singleFile,
-                  "suite": "validatesRunnerStreamingTests-df"]
     def cmdArgs = mapToArgString(argMap)
     exec {
       executable 'sh'


Mime
View raw message