You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2019/03/13 17:36:14 UTC

[beam] branch master updated: Update Py3 postcommit tests. (#8014)

This is an automated email from the ASF dual-hosted git repository.

pabloem 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 64f99b7  Update Py3 postcommit tests. (#8014)
64f99b7 is described below

commit 64f99b7df9252fe690d01a352be7561cbb585fb3
Author: tvalentyn <tv...@users.noreply.github.com>
AuthorDate: Wed Mar 13 10:35:54 2019 -0700

    Update Py3 postcommit tests. (#8014)
    
    * Decode msg.data when ready to process instead of modifying the object in place.
    
    * Increase test parallelism
---
 sdks/python/apache_beam/io/gcp/tests/pubsub_matcher.py | 4 +---
 sdks/python/test-suites/dataflow/py3/build.gradle      | 2 +-
 sdks/python/test-suites/direct/py3/build.gradle        | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/io/gcp/tests/pubsub_matcher.py b/sdks/python/apache_beam/io/gcp/tests/pubsub_matcher.py
index 8b8e515..ba7a674 100644
--- a/sdks/python/apache_beam/io/gcp/tests/pubsub_matcher.py
+++ b/sdks/python/apache_beam/io/gcp/tests/pubsub_matcher.py
@@ -103,9 +103,7 @@ class PubSubMessageMatcher(BaseMatcher):
       for rm in response.received_messages:
         msg = PubsubMessage._from_message(rm.message)
         if not self.with_attributes:
-          if isinstance(msg.data, bytes):
-            msg.data = msg.data.decode('utf-8')
-          total_messages.append(msg.data)
+          total_messages.append(msg.data.decode('utf-8'))
           continue
 
         if self.strip_attributes:
diff --git a/sdks/python/test-suites/dataflow/py3/build.gradle b/sdks/python/test-suites/dataflow/py3/build.gradle
index 35a201e..3675943 100644
--- a/sdks/python/test-suites/dataflow/py3/build.gradle
+++ b/sdks/python/test-suites/dataflow/py3/build.gradle
@@ -27,7 +27,7 @@ def runScriptsDir = "${project.rootDir}/sdks/python/scripts"
 // Basic test options for ITs running on Jenkins.
 def basicTestOpts = [
     "--nocapture",  // print stdout instantly
-    "--processes=4",  // run tests in parallel
+    "--processes=8",  // run tests in parallel
     "--process-timeout=4500", // timeout of whole command execution
 ]
 
diff --git a/sdks/python/test-suites/direct/py3/build.gradle b/sdks/python/test-suites/direct/py3/build.gradle
index 8720015..471b583 100644
--- a/sdks/python/test-suites/direct/py3/build.gradle
+++ b/sdks/python/test-suites/direct/py3/build.gradle
@@ -45,7 +45,7 @@ task postCommitIT(dependsOn: 'installGcpTest') {
     def testOpts = [
         "--tests=${batchTests.join(',')}",
         "--nocapture",    // Print stdout instantly
-        "--processes=4",  // run tests in parallel
+        "--processes=8",  // run tests in parallel
         "--process-timeout=4500", // timeout of whole command execution
     ]
     def argMap = ["runner": "TestDirectRunner",