Merge github.com:grpc/grpc into flowctlN

pull/11072/head
Craig Tiller 7 years ago
commit baf5e2ae91
  1. 4
      src/python/grpcio_tests/tests/http2/negative_http2_client.py
  2. 6
      src/python/grpcio_tests/tests/interop/client.py
  3. 4
      src/python/grpcio_tests/tests/qps/benchmark_client.py
  4. 4
      src/python/grpcio_tests/tests/stress/client.py
  5. 5
      tools/gce/linux_performance_worker_init.sh
  6. 2
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg
  7. 2
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg
  8. 2
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg
  9. 2
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg
  10. 2
      tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg
  11. 43
      tools/run_tests/performance/run_worker_php.sh
  12. 28
      tools/run_tests/performance/scenario_config.py
  13. 12
      tools/run_tests/run_tests_matrix.py

@ -17,7 +17,7 @@ import argparse
import grpc import grpc
import time import time
from src.proto.grpc.testing import test_pb2 from src.proto.grpc.testing import test_pb2_grpc
from src.proto.grpc.testing import messages_pb2 from src.proto.grpc.testing import messages_pb2
@ -147,7 +147,7 @@ def _stub(server_host, server_port):
target = '{}:{}'.format(server_host, server_port) target = '{}:{}'.format(server_host, server_port)
channel = grpc.insecure_channel(target) channel = grpc.insecure_channel(target)
grpc.channel_ready_future(channel).result() grpc.channel_ready_future(channel).result()
return test_pb2.TestServiceStub(channel) return test_pb2_grpc.TestServiceStub(channel)
def main(): def main():

@ -19,7 +19,7 @@ import os
from google import auth as google_auth from google import auth as google_auth
from google.auth import jwt as google_auth_jwt from google.auth import jwt as google_auth_jwt
import grpc import grpc
from src.proto.grpc.testing import test_pb2 from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import methods from tests.interop import methods
from tests.interop import resources from tests.interop import resources
@ -106,9 +106,9 @@ def _stub(args):
else: else:
channel = grpc.insecure_channel(target) channel = grpc.insecure_channel(target)
if args.test_case == "unimplemented_service": if args.test_case == "unimplemented_service":
return test_pb2.UnimplementedServiceStub(channel) return test_pb2_grpc.UnimplementedServiceStub(channel)
else: else:
return test_pb2.TestServiceStub(channel) return test_pb2_grpc.TestServiceStub(channel)
def _test_case_from_arg(test_case_arg): def _test_case_from_arg(test_case_arg):

@ -22,7 +22,7 @@ from six.moves import queue
import grpc import grpc
from src.proto.grpc.testing import messages_pb2 from src.proto.grpc.testing import messages_pb2
from src.proto.grpc.testing import services_pb2 from src.proto.grpc.testing import services_pb2_grpc
from tests.unit import resources from tests.unit import resources
from tests.unit import test_common from tests.unit import test_common
@ -58,7 +58,7 @@ class BenchmarkClient:
if config.payload_config.WhichOneof('payload') == 'simple_params': if config.payload_config.WhichOneof('payload') == 'simple_params':
self._generic = False self._generic = False
self._stub = services_pb2.BenchmarkServiceStub(channel) self._stub = services_pb2_grpc.BenchmarkServiceStub(channel)
payload = messages_pb2.Payload( payload = messages_pb2.Payload(
body='\0' * config.payload_config.simple_params.req_size) body='\0' * config.payload_config.simple_params.req_size)
self._request = messages_pb2.SimpleRequest( self._request = messages_pb2.SimpleRequest(

@ -20,7 +20,7 @@ import threading
import grpc import grpc
from six.moves import queue from six.moves import queue
from src.proto.grpc.testing import metrics_pb2_grpc from src.proto.grpc.testing import metrics_pb2_grpc
from src.proto.grpc.testing import test_pb2 from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import methods from tests.interop import methods
from tests.interop import resources from tests.interop import resources
@ -133,7 +133,7 @@ def run_test(args):
for _ in xrange(args.num_channels_per_server): for _ in xrange(args.num_channels_per_server):
channel = _get_channel(test_server_target, args) channel = _get_channel(test_server_target, args)
for _ in xrange(args.num_stubs_per_channel): for _ in xrange(args.num_stubs_per_channel):
stub = test_pb2.TestServiceStub(channel) stub = test_pb2_grpc.TestServiceStub(channel)
runner = test_runner.TestRunner(stub, test_cases, hist, runner = test_runner.TestRunner(stub, test_cases, hist,
exception_queue, stop_event) exception_queue, stop_event)
runners.append(runner) runners.append(runner)

@ -128,6 +128,11 @@ ruby -v
# Install bundler (prerequisite for gRPC Ruby) # Install bundler (prerequisite for gRPC Ruby)
gem install bundler gem install bundler
# PHP dependencies
sudo apt-get install -y php php-dev phpunit php-pear unzip zlib1g-dev
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
# Java dependencies - nothing as we already have Java JDK 8 # Java dependencies - nothing as we already have Java JDK 8
# Go dependencies # Go dependencies

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository. # Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
timeout_mins: 1440 timeout_mins: 240
action { action {
define_artifacts { define_artifacts {
regex: "**/*sponge_log.xml" regex: "**/*sponge_log.xml"

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository. # Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
timeout_mins: 1440 timeout_mins: 240
action { action {
define_artifacts { define_artifacts {
regex: "**/*sponge_log.xml" regex: "**/*sponge_log.xml"

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository. # Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
timeout_mins: 1440 timeout_mins: 240
action { action {
define_artifacts { define_artifacts {
regex: "**/*sponge_log.xml" regex: "**/*sponge_log.xml"

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository. # Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
timeout_mins: 1440 timeout_mins: 240
action { action {
define_artifacts { define_artifacts {
regex: "**/*sponge_log.xml" regex: "**/*sponge_log.xml"

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository. # Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
timeout_mins: 1440 timeout_mins: 240
action { action {
define_artifacts { define_artifacts {
regex: "**/*sponge_log.xml" regex: "**/*sponge_log.xml"

@ -0,0 +1,43 @@
#!/bin/bash
# Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
source ~/.rvm/scripts/rvm
set -ex
repo=$(dirname $0)/../../..
# First set up all dependences needed for PHP QPS test
cd $repo
cd src/php/tests/qps
composer install
# The proxy worker for PHP is implemented in Ruby
cd ../../../..
ruby src/ruby/qps/proxy-worker.rb $@

@ -800,6 +800,33 @@ class RubyLanguage:
return 'ruby' return 'ruby'
class PhpLanguage:
def __init__(self):
pass
self.safename = str(self)
def worker_cmdline(self):
return ['tools/run_tests/performance/run_worker_php.sh']
def worker_port_offset(self):
return 800
def scenarios(self):
yield _ping_pong_scenario(
'php_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
yield _ping_pong_scenario(
'php_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
def __str__(self):
return 'php'
class JavaLanguage: class JavaLanguage:
def __init__(self): def __init__(self):
@ -997,6 +1024,7 @@ LANGUAGES = {
'node' : NodeLanguage(), 'node' : NodeLanguage(),
'node_express': NodeExpressLanguage(), 'node_express': NodeExpressLanguage(),
'ruby' : RubyLanguage(), 'ruby' : RubyLanguage(),
'php' : PhpLanguage(),
'java' : JavaLanguage(), 'java' : JavaLanguage(),
'python' : PythonLanguage(), 'python' : PythonLanguage(),
'go' : GoLanguage(), 'go' : GoLanguage(),

@ -35,6 +35,9 @@ _DEFAULT_RUNTESTS_TIMEOUT = 1*60*60
# clang docker. # clang docker.
_CPP_RUNTESTS_TIMEOUT = 4*60*60 _CPP_RUNTESTS_TIMEOUT = 4*60*60
# C++ TSAN takes longer than other sanitizers
_CPP_TSAN_RUNTESTS_TIMEOUT = 8*60*60
# Number of jobs assigned to each run_tests.py instance # Number of jobs assigned to each run_tests.py instance
_DEFAULT_INNER_JOBS = 2 _DEFAULT_INNER_JOBS = 2
@ -190,12 +193,19 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
inner_jobs=inner_jobs, inner_jobs=inner_jobs,
timeout_seconds=_CPP_RUNTESTS_TIMEOUT) timeout_seconds=_CPP_RUNTESTS_TIMEOUT)
test_jobs += _generate_jobs(languages=['c++'], test_jobs += _generate_jobs(languages=['c++'],
configs=['asan', 'tsan'], configs=['asan'],
platforms=['linux'], platforms=['linux'],
labels=['sanitizers', 'corelang'], labels=['sanitizers', 'corelang'],
extra_args=extra_args, extra_args=extra_args,
inner_jobs=inner_jobs, inner_jobs=inner_jobs,
timeout_seconds=_CPP_RUNTESTS_TIMEOUT) timeout_seconds=_CPP_RUNTESTS_TIMEOUT)
test_jobs += _generate_jobs(languages=['c++'],
configs=['tsan'],
platforms=['linux'],
labels=['sanitizers', 'corelang'],
extra_args=extra_args,
inner_jobs=inner_jobs,
timeout_seconds=_CPP_TSAN_RUNTESTS_TIMEOUT)
return test_jobs return test_jobs

Loading…
Cancel
Save