Fix header_matching for PHP and Ruby (#26017)

pull/26031/head
Stanley Cheung 4 years ago committed by GitHub
parent f03a839f8a
commit ab3096f12c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/php/tests/interop/xds_client.php
  2. 2
      src/ruby/pb/test/xds_client.rb

@ -386,10 +386,14 @@ class ClientThread extends Thread {
// $this->metadata_to_send[$rpc] somehow becomes a
// Volatile object, instead of an associative array.
$metadata_array = [];
$execute_in_child_process = false;
foreach ($metadata as $key => $value) {
$metadata_array[$key] = [$value];
if ($key == 'rpc-behavior' || $key == 'fi_testcase') {
$execute_in_child_process = true;
}
}
if ($metadata_array && $this->rpc_config->tmp_file1) {
if ($execute_in_child_process && $this->rpc_config->tmp_file1) {
// if 'rpc-behavior' is set, we need to pawn off
// the execution to some other child PHP processes
$this->execute_rpc_in_child_process(

@ -283,7 +283,7 @@ def run_test_loop(stub, target_seconds_between_rpcs, fail_on_failed_rpcs)
raise "Unsupported rpc #{rpc}"
end
rpc_stats_key = rpc.to_s
if not metadata.empty?
if metadata.key?('rpc-behavior') or metadata.key?('fi_testcase')
keep_open_threads << execute_rpc_in_thread(op, rpc_stats_key)
else
results[rpc] = execute_rpc(op, fail_on_failed_rpcs, rpc_stats_key)

Loading…
Cancel
Save