Fix more minor typos (#37541)

Just thought I'd contribute some more typo fixes I've stumbled upon. This is a followup on #37450.

Use the following command to get a quick and dirty summary of the specific corrections made:
```shell
git diff HEAD^! --word-diff-regex='\w+' -U0 \
  | grep -E '\[\-.*\-\]\{\+.*\+\}' \
  | sed -r 's/.*\[\-(.*)\-\]\{\+(.*)\+\}.*/\1 \2/' \
  | sort | uniq -c | sort -n
```

FWIW, the top typos are:
* compressable (134)
* existant (82)
* unparseable (49)
* occured (24)
* replys (18)
* validing (17)
* writter (16)
* vaidate (9)
* directoty (8)
* convertabl (8)
* atrributes (8)
* indxes (8)
* transfered (7)
* exchage (7)
* descedent (6)
* enpoint (6)
* nonexistant (6)
* matadata (6)
* addtional (5)
* callack (5)
* experenced (5)
* wil (5)

Closes #37541

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37541 from NathanBaulch:typos 7cbfc121ed
PiperOrigin-RevId: 675772876
pull/37747/head
Nathan Baulch 2 months ago committed by Copybara-Service
parent f3b24f16d6
commit bdf52dd4ad
  1. 4
      src/compiler/php_generator.cc
  2. 2
      src/core/handshaker/http_connect/http_connect_handshaker.cc
  3. 6
      src/core/lib/event_engine/ares_resolver.cc
  4. 2
      src/core/lib/event_engine/cf_engine/dns_service_resolver.cc
  5. 2
      src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc
  6. 2
      src/core/lib/event_engine/windows/native_windows_dns_resolver.cc
  7. 2
      src/core/lib/iomgr/resolve_address_posix.cc
  8. 2
      src/core/lib/iomgr/resolve_address_windows.cc
  9. 6
      src/core/lib/promise/activity.h
  10. 2
      src/core/load_balancing/rls/rls.cc
  11. 6
      src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc
  12. 8
      src/core/util/log.cc
  13. 4
      src/php/tests/generated_code/Math/MathStub.php
  14. 14
      src/php/tests/generated_code/math_server.php
  15. 6
      src/php/tests/interop/Grpc/Testing/HookServiceStub.php
  16. 4
      src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceStub.php
  17. 4
      src/php/tests/interop/Grpc/Testing/ReconnectServiceStub.php
  18. 10
      src/php/tests/interop/Grpc/Testing/TestServiceStub.php
  19. 2
      src/php/tests/interop/Grpc/Testing/UnimplementedServiceStub.php
  20. 2
      src/php/tests/interop/Grpc/Testing/XdsUpdateClientConfigureServiceStub.php
  21. 6
      src/php/tests/interop/Grpc/Testing/XdsUpdateHealthServiceStub.php
  22. 18
      src/php/tests/interop/interop_server.php
  23. 2
      src/php/tests/interop/metrics_client.php
  24. 4
      src/php/tests/unit_tests/ServerCallTest.php
  25. 4
      src/php/tests/unit_tests/StatusTest.php
  26. 40
      src/ruby/spec/generic/client_stub_spec.rb
  27. 4
      test/core/channelz/channelz_registry_test.cc
  28. 4
      test/core/client_channel/retry_service_config_test.cc
  29. 6
      test/core/end2end/bad_server_response_test.cc
  30. 2
      test/core/end2end/connection_refused_test.cc
  31. 6
      test/core/end2end/invalid_call_argument_test.cc
  32. 4
      test/core/end2end/no_server_test.cc
  33. 2
      test/core/end2end/tests/no_logging.cc
  34. 44
      test/core/event_engine/test_suite/tests/dns_test.cc
  35. 28
      test/core/iomgr/resolve_address_test.cc
  36. 30
      test/core/load_balancing/rls_lb_config_parser_test.cc
  37. 24
      test/core/security/credentials_test.cc
  38. 2
      test/core/surface/server_chttp2_test.cc
  39. 2
      test/core/xds/xds_client_test.cc
  40. 8
      test/core/xds/xds_cluster_resource_type_test.cc
  41. 2
      test/core/xds/xds_endpoint_resource_type_test.cc
  42. 14
      test/core/xds/xds_http_filters_test.cc
  43. 6
      test/core/xds/xds_listener_resource_type_test.cc
  44. 8
      test/core/xds/xds_route_config_resource_type_test.cc
  45. 16
      test/cpp/common/alts_util_test.cc
  46. 44
      test/cpp/end2end/xds/xds_cluster_end2end_test.cc
  47. 8
      test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc
  48. 2
      test/cpp/end2end/xds/xds_core_end2end_test.cc
  49. 12
      test/cpp/end2end/xds/xds_end2end_test_lib.h
  50. 2
      test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc
  51. 24
      test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc
  52. 88
      test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc
  53. 22
      test/cpp/end2end/xds/xds_routing_end2end_test.cc
  54. 18
      test/cpp/util/channel_trace_proto_helper.cc
  55. 12
      test/cpp/util/channelz_sampler.cc

@ -176,7 +176,7 @@ void PrintServerMethod(const MethodDescriptor* method, Printer* out) {
"of \\$input_type_id$\n"
" * @param \\Grpc\\ServerContext $$context server request context\n"
" * @return \\$output_type_id$ for response data, null if if error "
"occured\n"
"occurred\n"
" * initial metadata (if any) and status (if not ok) should be set "
"to $$context\n"
" */\n"
@ -208,7 +208,7 @@ void PrintServerMethod(const MethodDescriptor* method, Printer* out) {
" * @param \\$input_type_id$ $$request client request\n"
" * @param \\Grpc\\ServerContext $$context server request context\n"
" * @return \\$output_type_id$ for response data, null if if error "
"occured\n"
"occurred\n"
" * initial metadata (if any) and status (if not ok) should be set "
"to $$context\n"
" */\n"

@ -279,7 +279,7 @@ void HttpConnectHandshaker::DoHandshake(
for (size_t i = 0; i < num_header_strings; ++i) {
char* sep = strchr(header_strings[i], ':');
if (sep == nullptr) {
LOG(ERROR) << "skipping unparseable HTTP CONNECT header: "
LOG(ERROR) << "skipping unparsable HTTP CONNECT header: "
<< header_strings[i];
continue;
}

@ -272,7 +272,7 @@ void AresResolver::LookupHostname(
event_engine_->Run(
[callback = std::move(callback),
status = absl::InvalidArgumentError(absl::StrCat(
"Unparseable name: ", name))]() mutable { callback(status); });
"Unparsable name: ", name))]() mutable { callback(status); });
return;
}
if (host.empty()) {
@ -351,7 +351,7 @@ void AresResolver::LookupSRV(
event_engine_->Run(
[callback = std::move(callback),
status = absl::InvalidArgumentError(absl::StrCat(
"Unparseable name: ", name))]() mutable { callback(status); });
"Unparsable name: ", name))]() mutable { callback(status); });
return;
}
if (host.empty()) {
@ -386,7 +386,7 @@ void AresResolver::LookupTXT(
event_engine_->Run(
[callback = std::move(callback),
status = absl::InvalidArgumentError(absl::StrCat(
"Unparseable name: ", name))]() mutable { callback(status); });
"Unparsable name: ", name))]() mutable { callback(status); });
return;
}
if (host.empty()) {

@ -43,7 +43,7 @@ void DNSServiceResolverImpl::LookupHostname(
if (!grpc_core::SplitHostPort(name, &host, &port_string)) {
engine_->Run([on_resolve = std::move(on_resolve),
status = absl::InvalidArgumentError(
absl::StrCat("Unparseable name: ", name))]() mutable {
absl::StrCat("Unparsable name: ", name))]() mutable {
on_resolve(status);
});
return;

@ -50,7 +50,7 @@ LookupHostnameBlocking(absl::string_view name, absl::string_view default_port) {
// parse name, splitting it into host and port parts
grpc_core::SplitHostPort(name, &host, &port);
if (host.empty()) {
return absl::InvalidArgumentError(absl::StrCat("Unparseable name: ", name));
return absl::InvalidArgumentError(absl::StrCat("Unparsable name: ", name));
}
if (port.empty()) {
if (default_port.empty()) {

@ -42,7 +42,7 @@ LookupHostnameBlocking(absl::string_view name, absl::string_view default_port) {
std::string port;
grpc_core::SplitHostPort(name, &host, &port);
if (host.empty()) {
return absl::InvalidArgumentError(absl::StrCat("Unparseable name: ", name));
return absl::InvalidArgumentError(absl::StrCat("Unparsable name: ", name));
}
if (port.empty()) {
if (default_port.empty()) {

@ -106,7 +106,7 @@ NativeDNSResolver::LookupHostnameBlocking(absl::string_view name,
SplitHostPort(name, &host, &port);
if (host.empty()) {
err =
GRPC_ERROR_CREATE(absl::StrCat("unparseable host:port \"", name, "\""));
GRPC_ERROR_CREATE(absl::StrCat("unparsable host:port \"", name, "\""));
goto done;
}
if (port.empty()) {

@ -110,7 +110,7 @@ NativeDNSResolver::LookupHostnameBlocking(absl::string_view name,
SplitHostPort(name, &host, &port);
if (host.empty()) {
error =
GRPC_ERROR_CREATE(absl::StrFormat("unparseable host:port: '%s'", name));
GRPC_ERROR_CREATE(absl::StrFormat("unparsable host:port: '%s'", name));
goto done;
}
if (port.empty()) {

@ -368,8 +368,8 @@ class FreestandingActivity : public Activity, private Wakeable {
// If more than one action is received during a run, we use max() to resolve
// which one to report (so Cancel overrides Wakeup).
enum class ActionDuringRun : uint8_t {
kNone, // No action occured during run.
kWakeup, // A wakeup occured during run.
kNone, // No action occurred during run.
kWakeup, // A wakeup occurred during run.
kCancel, // Cancel was called during run.
};
@ -389,7 +389,7 @@ class FreestandingActivity : public Activity, private Wakeable {
// completed.
void WakeupComplete() { Unref(); }
// Set the action that occured during this run.
// Set the action that occurred during this run.
// We use max to combine actions so that cancellation overrides wakeups.
void SetActionDuringRun(ActionDuringRun action)
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {

@ -2590,7 +2590,7 @@ class RlsLbFactory final : public LoadBalancingPolicyFactory {
absl::StatusOr<RefCountedPtr<LoadBalancingPolicy::Config>>
ParseLoadBalancingConfig(const Json& json) const override {
return LoadFromJson<RefCountedPtr<RlsLbConfig>>(
json, JsonArgs(), "errors validing RLS LB policy config");
json, JsonArgs(), "errors validating RLS LB policy config");
}
};

@ -388,7 +388,7 @@ static void on_readable(void* arg, grpc_error_handle error) {
// this ev_driver will be cancelled by the following ares_cancel() and the
// on_done callbacks will be invoked with a status of ARES_ECANCELLED. The
// remaining file descriptors in this ev_driver will be cleaned up in the
// follwing grpc_ares_notify_on_event_locked().
// following grpc_ares_notify_on_event_locked().
ares_cancel(ev_driver->channel);
}
grpc_ares_notify_on_event_locked(ev_driver);
@ -413,7 +413,7 @@ static void on_writable(void* arg, grpc_error_handle error) {
// this ev_driver will be cancelled by the following ares_cancel() and the
// on_done callbacks will be invoked with a status of ARES_ECANCELLED. The
// remaining file descriptors in this ev_driver will be cleaned up in the
// follwing grpc_ares_notify_on_event_locked().
// following grpc_ares_notify_on_event_locked().
ares_cancel(ev_driver->channel);
}
grpc_ares_notify_on_event_locked(ev_driver);
@ -910,7 +910,7 @@ grpc_error_handle grpc_dns_lookup_ares_continued(
grpc_core::SplitHostPort(name, host, port);
if (host->empty()) {
error =
GRPC_ERROR_CREATE(absl::StrCat("unparseable host:port \"", name, "\""));
GRPC_ERROR_CREATE(absl::StrCat("unparsable host:port \"", name, "\""));
return error;
} else if (check_port && port->empty()) {
if (default_port == nullptr || strlen(default_port) == 0) {

@ -104,15 +104,15 @@ void gpr_log_verbosity_init(void) {
if (absl::EqualsIgnoreCase(verbosity, "INFO")) {
LOG_FIRST_N(WARNING, 1)
<< "Log level INFO is not suitable for production. Prefer WARNING or "
"ERROR. However if you see this message in a debug environmenmt or "
"test environmenmt it is safe to ignore this message.";
"ERROR. However if you see this message in a debug environment or "
"test environment it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", -1);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "DEBUG")) {
LOG_FIRST_N(WARNING, 1)
<< "Log level DEBUG is not suitable for production. Prefer WARNING or "
"ERROR. However if you see this message in a debug environmenmt or "
"test environmenmt it is safe to ignore this message.";
"ERROR. However if you see this message in a debug environment or "
"test environment it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", 2);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "ERROR")) {

@ -27,7 +27,7 @@ class MathStub {
* and remainder.
* @param \Math\DivArgs $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Math\DivReply for response data, null if if error occured
* @return \Math\DivReply for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Div(
@ -80,7 +80,7 @@ class MathStub {
* is closed.
* @param \Grpc\ServerCallReader $reader read client request data of \Math\Num
* @param \Grpc\ServerContext $context server request context
* @return \Math\Num for response data, null if if error occured
* @return \Math\Num for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Sum(

@ -63,7 +63,7 @@ class MathService extends Math\MathStub
public function DivMany(
\Grpc\ServerCallReader $reader,
\Grpc\ServerCallWriter $writter,
\Grpc\ServerCallWriter $writer,
\Grpc\ServerContext $context
): void {
while ($divArgs = $reader->read()) {
@ -74,7 +74,7 @@ class MathService extends Math\MathStub
\Grpc\STATUS_INVALID_ARGUMENT,
'Cannot divide by zero'
));
$writter->finish();
$writer->finish();
return;
}
$quotient = intdiv($dividend, $divisor);
@ -83,14 +83,14 @@ class MathService extends Math\MathStub
'quotient' => $quotient,
'remainder' => $remainder,
]);
$writter->write($reply);
$writer->write($reply);
}
$writter->finish();
$writer->finish();
}
public function Fib(
\Math\FibArgs $request,
\Grpc\ServerCallWriter $writter,
\Grpc\ServerCallWriter $writer,
\Grpc\ServerContext $context
): void {
$previous = 0;
@ -99,12 +99,12 @@ class MathService extends Math\MathStub
for ($i = 0; $i < $limit; $i++) {
$num = new \Math\Num();
$num->setNum($current);
$writter->write($num);
$writer->write($num);
$next = $previous + $current;
$previous = $current;
$current = $next;
}
$writter->finish();
$writer->finish();
}
/**

@ -31,7 +31,7 @@ class HookServiceStub {
* to a SetReturnStatus
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Hook(
@ -46,7 +46,7 @@ class HookServiceStub {
* Sets a return status for pending and upcoming calls to Hook
* @param \Grpc\Testing\SetReturnStatusRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function SetReturnStatus(
@ -61,7 +61,7 @@ class HookServiceStub {
* Clears the return status. Incoming calls to Hook will "hang"
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function ClearReturnStatus(

@ -30,7 +30,7 @@ class LoadBalancerStatsServiceStub {
* Gets the backend distribution for RPCs sent by a test client.
* @param \Grpc\Testing\LoadBalancerStatsRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\LoadBalancerStatsResponse for response data, null if if error occured
* @return \Grpc\Testing\LoadBalancerStatsResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function GetClientStats(
@ -45,7 +45,7 @@ class LoadBalancerStatsServiceStub {
* Gets the accumulated stats for RPCs sent by a test client.
* @param \Grpc\Testing\LoadBalancerAccumulatedStatsRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\LoadBalancerAccumulatedStatsResponse for response data, null if if error occured
* @return \Grpc\Testing\LoadBalancerAccumulatedStatsResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function GetClientAccumulatedStats(

@ -29,7 +29,7 @@ class ReconnectServiceStub {
/**
* @param \Grpc\Testing\ReconnectParams $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Start(
@ -43,7 +43,7 @@ class ReconnectServiceStub {
/**
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\ReconnectInfo for response data, null if if error occured
* @return \Grpc\Testing\ReconnectInfo for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Stop(

@ -31,7 +31,7 @@ class TestServiceStub {
* One empty request followed by one empty response.
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function EmptyCall(
@ -46,7 +46,7 @@ class TestServiceStub {
* One request followed by one response.
* @param \Grpc\Testing\SimpleRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\SimpleResponse for response data, null if if error occured
* @return \Grpc\Testing\SimpleResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function UnaryCall(
@ -63,7 +63,7 @@ class TestServiceStub {
* satisfy subsequent requests.
* @param \Grpc\Testing\SimpleRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\SimpleResponse for response data, null if if error occured
* @return \Grpc\Testing\SimpleResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function CacheableUnaryCall(
@ -96,7 +96,7 @@ class TestServiceStub {
* The server returns the aggregated size of client payload as the result.
* @param \Grpc\ServerCallReader $reader read client request data of \Grpc\Testing\StreamingInputCallRequest
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\StreamingInputCallResponse for response data, null if if error occured
* @return \Grpc\Testing\StreamingInputCallResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function StreamingInputCall(
@ -149,7 +149,7 @@ class TestServiceStub {
* to test the behavior when clients call unimplemented methods.
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function UnimplementedCall(

@ -31,7 +31,7 @@ class UnimplementedServiceStub {
* A call that no server should implement
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function UnimplementedCall(

@ -30,7 +30,7 @@ class XdsUpdateClientConfigureServiceStub {
* Update the tes client's configuration.
* @param \Grpc\Testing\ClientConfigureRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\ClientConfigureResponse for response data, null if if error occured
* @return \Grpc\Testing\ClientConfigureResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function Configure(

@ -29,7 +29,7 @@ class XdsUpdateHealthServiceStub {
/**
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function SetServing(
@ -43,7 +43,7 @@ class XdsUpdateHealthServiceStub {
/**
* @param \Grpc\Testing\EmptyMessage $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occured
* @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function SetNotServing(
@ -57,7 +57,7 @@ class XdsUpdateHealthServiceStub {
/**
* @param \Grpc\Testing\HookRequest $request client request
* @param \Grpc\ServerContext $context server request context
* @return \Grpc\Testing\HookResponse for response data, null if if error occured
* @return \Grpc\Testing\HookResponse for response data, null if if error occurred
* initial metadata (if any) and status (if not ok) should be set to $context
*/
public function SendHookRequest(

@ -102,7 +102,7 @@ class TestService extends \Grpc\Testing\TestServiceStub
public function StreamingOutputCall(
\Grpc\Testing\StreamingOutputCallRequest $request,
\Grpc\ServerCallWriter $writter,
\Grpc\ServerCallWriter $writer,
\Grpc\ServerContext $context
): void {
$echo_status = $this->maybeEchoStatusAndMessage($request);
@ -119,10 +119,10 @@ class TestService extends \Grpc\Testing\TestServiceStub
'payload' => $payload,
]);
$options = [];
$writter->write($response, $options);
$writer->write($response, $options);
}
$context->setStatus($echo_status ?? \Grpc\Status::ok());
$writter->finish();
$writer->finish();
}
public function StreamingInputCall(
@ -142,7 +142,7 @@ class TestService extends \Grpc\Testing\TestServiceStub
public function FullDuplexCall(
\Grpc\ServerCallReader $reader,
\Grpc\ServerCallWriter $writter,
\Grpc\ServerCallWriter $writer,
\Grpc\ServerContext $context
): void {
list($initial_metadata, $trailing_metadata) =
@ -155,7 +155,7 @@ class TestService extends \Grpc\Testing\TestServiceStub
);
if ($echo_status) {
$context->setStatus($echo_status);
$writter->finish();
$writer->finish();
return;
}
@ -171,20 +171,20 @@ class TestService extends \Grpc\Testing\TestServiceStub
'payload' => $payload,
]);
$options = [];
$writter->write($response, $options);
$writer->write($response, $options);
}
}
$context->setStatus(\Grpc\Status::ok($trailing_metadata));
$writter->finish();
$writer->finish();
}
public function HalfDuplexCall(
\Grpc\ServerCallReader $reader,
\Grpc\ServerCallWriter $writter,
\Grpc\ServerCallWriter $writer,
\Grpc\ServerContext $context
): void {
$context->setStatus(\Grpc\Status::unimplemented());
$writter->finish();
$writer->finish();
}
public function UnimplementedCall(

@ -24,7 +24,7 @@ $server_port = (count($parts) == 2) ? $parts[1] : '';
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
if (@!socket_connect($socket, $server_host, $server_port)) {
echo "Cannot connect to merics server...\n";
echo "Cannot connect to metrics server...\n";
exit(1);
}
socket_write($socket, 'qps');

@ -236,7 +236,7 @@ class ServerCallTest extends \PHPUnit\Framework\TestCase
$status = \Grpc\Status::status(
\Grpc\STATUS_INVALID_ARGUMENT,
"invalid argument",
['trailiingMeta' => 100]
['trailingMeta' => 100]
);
$this->mockCall->expects($this->once())
@ -259,7 +259,7 @@ class ServerCallTest extends \PHPUnit\Framework\TestCase
{
$metadata = ['a' => 1];
$message = $this->newStringMessage();
$status = \Grpc\Status::ok(['trailiingMeta' => 100]);
$status = \Grpc\Status::ok(['trailingMeta' => 100]);
$this->mockCall->expects($this->once())
->method('startBatch')

@ -70,12 +70,12 @@ class StatusTest extends \PHPUnit\Framework\TestCase
$status = [
'code' => \Grpc\STATUS_INVALID_ARGUMENT,
'details' => 'invalid argument',
'metadata' => ['trailiingMeta' => 100]
'metadata' => ['trailingMeta' => 100]
];
$return = \Grpc\Status::status(
\Grpc\STATUS_INVALID_ARGUMENT,
"invalid argument",
['trailiingMeta' => 100]
['trailingMeta' => 100]
);
$this->assertEquals($status, $return);
}

@ -453,23 +453,23 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
describe '#server_streamer', server_streamer: true do
before(:each) do
@sent_msg = 'a_msg'
@replys = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
@replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
end
shared_examples 'server streaming' do
it 'should send a request to/receive replies from a server' do
server_port = create_test_server
host = "localhost:#{server_port}"
th = run_server_streamer(@sent_msg, @replys, @pass)
th = run_server_streamer(@sent_msg, @replies, @pass)
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
expect(get_responses(stub).collect { |r| r }).to eq(@replys)
expect(get_responses(stub).collect { |r| r }).to eq(@replies)
th.join
end
it 'should raise an error if the status is not ok' do
server_port = create_test_server
host = "localhost:#{server_port}"
th = run_server_streamer(@sent_msg, @replys, @fail)
th = run_server_streamer(@sent_msg, @replies, @fail)
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
e = get_responses(stub)
expect { e.collect { |r| r } }.to raise_error(GRPC::BadStatus)
@ -479,7 +479,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
it 'should send metadata to the server ok' do
server_port = create_test_server
host = "localhost:#{server_port}"
th = run_server_streamer(@sent_msg, @replys, @fail,
th = run_server_streamer(@sent_msg, @replies, @fail,
expected_metadata: { k1: 'v1', k2: 'v2' })
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
e = get_responses(stub)
@ -502,7 +502,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
server_port = create_test_server
host = "localhost:#{server_port}"
th = run_server_streamer_handle_client_cancellation(
@sent_msg, @replys)
@sent_msg, @replies)
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
unmarshal = proc { fail(ArgumentError, 'test unmarshalling error') }
@ -547,13 +547,13 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
@server_initial_md = { 'sk1' => 'sv1', 'sk2' => 'sv2' }
@server_trailing_md = { 'tk1' => 'tv1', 'tk2' => 'tv2' }
th = run_server_streamer(
@sent_msg, @replys, @pass,
@sent_msg, @replies, @pass,
expected_metadata: @metadata,
server_initial_md: @server_initial_md,
server_trailing_md: @server_trailing_md)
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
e = get_responses(stub, run_start_call_first: run_start_call_first)
expect(e.collect { |r| r }).to eq(@replys)
expect(e.collect { |r| r }).to eq(@replies)
th.join
end
@ -577,7 +577,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
server_port = create_test_server
host = "localhost:#{server_port}"
th = run_server_streamer_handle_client_cancellation(
@sent_msg, @replys)
@sent_msg, @replies)
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
resp = get_responses(stub, run_start_call_first: false)
expect(resp.next).to eq('reply_1')
@ -591,18 +591,18 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
describe '#bidi_streamer', bidi: true do
before(:each) do
@sent_msgs = Array.new(3) { |i| 'msg_' + (i + 1).to_s }
@replys = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
@replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
server_port = create_test_server
@host = "localhost:#{server_port}"
end
shared_examples 'bidi streaming' do
it 'supports sending all the requests first' do
th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replys,
th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replies,
@pass)
stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure)
e = get_responses(stub)
expect(e.collect { |r| r }).to eq(@replys)
expect(e.collect { |r| r }).to eq(@replies)
th.join
end
@ -724,7 +724,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
requests_to_push,
request_queue,
expected_error_message)
# the write loop errror should cancel the call and end the
# the write loop error should cancel the call and end the
# server's request stream
th.join
end
@ -777,7 +777,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
it 'receives a grpc status code when writes to a bidi stream fail' do
# This test tries to trigger the case when a 'SEND_MESSAGE' op
# and subseqeunt 'SEND_CLOSE_FROM_CLIENT' op of a bidi stream fails.
# and subsequent 'SEND_CLOSE_FROM_CLIENT' op of a bidi stream fails.
# In this case, iteration through the response stream should result
# in a grpc status code, and the writer thread should not raise an
# exception.
@ -942,7 +942,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
end
end
def run_server_streamer(expected_input, replys, status,
def run_server_streamer(expected_input, replies, status,
expected_metadata: {},
server_initial_md: {},
server_trailing_md: {})
@ -954,19 +954,19 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
expect(c.metadata[k.to_s]).to eq(v)
end
expect(c.remote_read).to eq(expected_input)
replys.each { |r| c.remote_send(r) }
replies.each { |r| c.remote_send(r) }
c.send_status(status, status == @pass ? 'OK' : 'NOK', true,
metadata: server_trailing_md)
close_active_server_call(c)
end
end
def run_bidi_streamer_handle_inputs_first(expected_inputs, replys,
def run_bidi_streamer_handle_inputs_first(expected_inputs, replies,
status)
wakey_thread do |notifier|
c = expect_server_to_be_invoked(notifier)
expected_inputs.each { |i| expect(c.remote_read).to eq(i) }
replys.each { |r| c.remote_send(r) }
replies.each { |r| c.remote_send(r) }
c.send_status(status, status == @pass ? 'OK' : 'NOK', true)
close_active_server_call(c)
end
@ -1018,12 +1018,12 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
end
def run_server_streamer_handle_client_cancellation(
expected_input, replys)
expected_input, replies)
wakey_thread do |notifier|
c = expect_server_to_be_invoked(notifier)
expect(c.remote_read).to eq(expected_input)
begin
replys.each { |r| c.remote_send(r) }
replies.each { |r| c.remote_send(r) }
rescue GRPC::Core::CallError
# An attempt to write to the client might fail. This is ok
# because the client call is expected to cancel the call,

@ -83,9 +83,9 @@ TEST_F(ChannelzRegistryTest, RegisterManyItems) {
TEST_F(ChannelzRegistryTest, NullIfNotPresentTest) {
RefCountedPtr<BaseNode> channelz_channel = CreateTestNode();
// try to pull out a uuid that does not exist.
RefCountedPtr<BaseNode> nonexistant =
RefCountedPtr<BaseNode> nonexistent =
ChannelzRegistry::Get(channelz_channel->uuid() + 1);
EXPECT_EQ(nonexistant, nullptr);
EXPECT_EQ(nonexistent, nullptr);
RefCountedPtr<BaseNode> retrieved =
ChannelzRegistry::Get(channelz_channel->uuid());
EXPECT_EQ(channelz_channel, retrieved);

@ -473,7 +473,7 @@ TEST_F(RetryParserTest,
<< service_config.status();
}
TEST_F(RetryParserTest, InvalidRetryPolicyUnparseableRetryableStatusCodes) {
TEST_F(RetryParserTest, InvalidRetryPolicyUnparsableRetryableStatusCodes) {
const char* test_json =
"{\n"
" \"methodConfig\": [ {\n"
@ -614,7 +614,7 @@ TEST_F(RetryParserTest,
EXPECT_TRUE(parsed_config->retryable_status_codes().Empty());
}
TEST_F(RetryParserTest, InvalidRetryPolicyPerAttemptRecvTimeoutUnparseable) {
TEST_F(RetryParserTest, InvalidRetryPolicyPerAttemptRecvTimeoutUnparsable) {
const char* test_json =
"{\n"
" \"methodConfig\": [ {\n"

@ -75,7 +75,7 @@
"application/grpc" \
"\x10\x07:status\x03" #STATUS_CODE
#define UNPARSEABLE_RESP "Bad Request\n"
#define UNPARSABLE_RESP "Bad Request\n"
#define HTTP2_DETAIL_MSG(STATUS_CODE) \
"Received http2 header with status: " #STATUS_CODE
@ -394,10 +394,10 @@ int main(int argc, char** argv) {
GRPC_STATUS_UNAVAILABLE, HTTP2_DETAIL_MSG(503));
run_test(true, true, HTTP2_RESP(504), sizeof(HTTP2_RESP(504)) - 1,
GRPC_STATUS_UNAVAILABLE, HTTP2_DETAIL_MSG(504));
// unparseable response. RPC should fail immediately due to a connect
// unparsable response. RPC should fail immediately due to a connect
// failure.
//
run_test(false, false, UNPARSEABLE_RESP, sizeof(UNPARSEABLE_RESP) - 1,
run_test(false, false, UNPARSABLE_RESP, sizeof(UNPARSABLE_RESP) - 1,
GRPC_STATUS_UNAVAILABLE, nullptr);
// http1 response. RPC should fail immediately due to a connect failure.

@ -85,7 +85,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
grpc_channel_credentials* creds = grpc_insecure_credentials_create();
chan = grpc_channel_create(addr.c_str(), creds, args);
grpc_channel_credentials_release(creds);
grpc_slice host = grpc_slice_from_static_string("nonexistant");
grpc_slice host = grpc_slice_from_static_string("nonexistent");
gpr_timespec deadline =
grpc_timeout_seconds_to_deadline(wait_for_ready ? 2 : 600);
call =

@ -74,11 +74,11 @@ static void prepare_test(int is_client) {
memset(g_state.ops, 0, sizeof(g_state.ops));
if (is_client) {
// create a call, channel to a non existant server
// create a call, channel to a non existent server
grpc_channel_credentials* creds = grpc_insecure_credentials_create();
g_state.chan = grpc_channel_create("nonexistant:54321", creds, nullptr);
g_state.chan = grpc_channel_create("nonexistent:54321", creds, nullptr);
grpc_channel_credentials_release(creds);
grpc_slice host = grpc_slice_from_static_string("nonexistant");
grpc_slice host = grpc_slice_from_static_string("nonexistent");
g_state.call = grpc_channel_create_call(
g_state.chan, nullptr, GRPC_PROPAGATE_DEFAULTS, g_state.cq,
grpc_slice_from_static_string("/Foo"), &host, g_state.deadline,

@ -57,10 +57,10 @@ void run_test(bool wait_for_ready) {
grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
auto args = grpc_core::ChannelArgs().SetObject(response_generator).ToC();
// create a call, channel to a non existant server
// create a call, channel to a non existent server
grpc_channel_credentials* creds = grpc_insecure_credentials_create();
grpc_channel* chan =
grpc_channel_create("fake:nonexistant", creds, args.get());
grpc_channel_create("fake:nonexistent", creds, args.get());
grpc_channel_credentials_release(creds);
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2);
grpc_call* call = grpc_channel_create_call(

@ -99,7 +99,7 @@ class VerifyLogNoiseLogSink : public absl::LogSink {
std::regex("Failed to bind some addresses for.*")},
{"log.cc",
std::regex("Prefer WARNING or ERROR. However if you see this "
"message in a debug environmenmt or test environmenmt "
"message in a debug environment or test environment "
"it is safe to ignore this message.")}});
if (IsVlogWithVerbosityMoreThan1(entry)) {

@ -557,7 +557,7 @@ TEST_F(EventEngineDNSTest, InvalidIPv6Addresses) {
&dns_resolver_signal_, "[2001:db8::11111]:1");
}
void TestUnparseableHostPort(
void TestUnparsableHostPort(
std::unique_ptr<EventEngine::DNSResolver> dns_resolver,
grpc_core::Notification* barrier, absl::string_view target) {
dns_resolver->LookupHostname(
@ -569,38 +569,38 @@ void TestUnparseableHostPort(
barrier->WaitForNotification();
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsOnlyBracket) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[");
TEST_F(EventEngineDNSTest, UnparsableHostPortsOnlyBracket) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsMissingRightBracket) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[::1");
TEST_F(EventEngineDNSTest, UnparsableHostPortsMissingRightBracket) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[::1");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsBadPort) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[::1]bad");
TEST_F(EventEngineDNSTest, UnparsableHostPortsBadPort) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[::1]bad");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsBadIPv6) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[1.2.3.4]");
TEST_F(EventEngineDNSTest, UnparsableHostPortsBadIPv6) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[1.2.3.4]");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsBadLocalhost) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[localhost]");
TEST_F(EventEngineDNSTest, UnparsableHostPortsBadLocalhost) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[localhost]");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsBadLocalhostWithPort) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[localhost]:1");
TEST_F(EventEngineDNSTest, UnparsableHostPortsBadLocalhostWithPort) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, "[localhost]:1");
}
TEST_F(EventEngineDNSTest, UnparseableHostPortsEmptyHostname) {
TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, ":443");
TEST_F(EventEngineDNSTest, UnparsableHostPortsEmptyHostname) {
TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(),
&dns_resolver_signal_, ":443");
}
// END

@ -240,7 +240,7 @@ const address_sorting_source_addr_factory_vtable
} // namespace
TEST_F(ResolveAddressTest, LocalhostResultHasIPv4FirstWhenIPv6IsntAvalailable) {
TEST_F(ResolveAddressTest, LocalhostResultHasIPv4FirstWhenIPv6IsntAvailable) {
if (std::string(g_resolver_type) != "ares") {
GTEST_SKIP() << "this test is only valid with the c-ares resolver";
}
@ -326,7 +326,7 @@ TEST_F(ResolveAddressTest, InvalidIPv6Addresses) {
TestInvalidIPAddress(this, "[2001:db8::11111]:1");
}
void TestUnparseableHostPort(ResolveAddressTest* test, const char* target) {
void TestUnparsableHostPort(ResolveAddressTest* test, const char* target) {
grpc_core::ExecCtx exec_ctx;
grpc_core::GetDNSResolver()->LookupHostname(
absl::bind_front(&ResolveAddressTest::MustFail, test), target, "1",
@ -335,28 +335,28 @@ void TestUnparseableHostPort(ResolveAddressTest* test, const char* target) {
test->PollPollsetUntilRequestDone();
}
TEST_F(ResolveAddressTest, UnparseableHostPortsOnlyBracket) {
TestUnparseableHostPort(this, "[");
TEST_F(ResolveAddressTest, UnparsableHostPortsOnlyBracket) {
TestUnparsableHostPort(this, "[");
}
TEST_F(ResolveAddressTest, UnparseableHostPortsMissingRightBracket) {
TestUnparseableHostPort(this, "[::1");
TEST_F(ResolveAddressTest, UnparsableHostPortsMissingRightBracket) {
TestUnparsableHostPort(this, "[::1");
}
TEST_F(ResolveAddressTest, UnparseableHostPortsBadPort) {
TestUnparseableHostPort(this, "[::1]bad");
TEST_F(ResolveAddressTest, UnparsableHostPortsBadPort) {
TestUnparsableHostPort(this, "[::1]bad");
}
TEST_F(ResolveAddressTest, UnparseableHostPortsBadIPv6) {
TestUnparseableHostPort(this, "[1.2.3.4]");
TEST_F(ResolveAddressTest, UnparsableHostPortsBadIPv6) {
TestUnparsableHostPort(this, "[1.2.3.4]");
}
TEST_F(ResolveAddressTest, UnparseableHostPortsBadLocalhost) {
TestUnparseableHostPort(this, "[localhost]");
TEST_F(ResolveAddressTest, UnparsableHostPortsBadLocalhost) {
TestUnparsableHostPort(this, "[localhost]");
}
TEST_F(ResolveAddressTest, UnparseableHostPortsBadLocalhostWithPort) {
TestUnparseableHostPort(this, "[localhost]:1");
TEST_F(ResolveAddressTest, UnparsableHostPortsBadLocalhostWithPort) {
TestUnparsableHostPort(this, "[localhost]:1");
}
// Kick off a simple DNS resolution and then immediately cancel. This

@ -90,7 +90,7 @@ TEST_F(RlsConfigParsingTest, TopLevelRequiredFieldsMissing) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig error:field not present]"))
@ -115,7 +115,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsWrongTypes) {
EXPECT_EQ(service_config.status().message(),
"errors validating service config: ["
"field:loadBalancingConfig "
"error:errors validing RLS LB policy config: ["
"error:errors validating RLS LB policy config: ["
"field:childPolicy error:is not an array; "
"field:childPolicyConfigTargetFieldName error:is not a string; "
"field:routeLookupChannelServiceConfig error:is not an object; "
@ -141,7 +141,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsInvalidValues) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:No known policies in list: unknown; "
"field:childPolicyConfigTargetFieldName error:must be non-empty; "
"field:routeLookupConfig error:field not present]"))
@ -165,7 +165,7 @@ TEST_F(RlsConfigParsingTest, InvalidChildPolicyConfig) {
EXPECT_EQ(service_config.status().code(), absl::StatusCode::kInvalidArgument);
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr("errors validing RLS LB policy config: ["
::testing::HasSubstr("errors validating RLS LB policy config: ["
"field:childPolicy error:"
"errors validating grpclb LB policy config: ["
"field:childPolicy error:type should be array]; "
@ -194,7 +194,7 @@ TEST_F(RlsConfigParsingTest, InvalidRlsChannelServiceConfig) {
EXPECT_EQ(service_config.status().message(),
"errors validating service config: ["
"field:loadBalancingConfig "
"error:errors validing RLS LB policy config: ["
"error:errors validating RLS LB policy config: ["
"field:routeLookupChannelServiceConfig.loadBalancingPolicy "
"error:unknown LB policy \"unknown\"; "
"field:routeLookupConfig error:field not present]]")
@ -221,7 +221,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigRequiredFieldsMissing) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -254,7 +254,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsWrongTypes) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:"
@ -286,7 +286,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsInvalidValues) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:"
@ -321,7 +321,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderRequiredFieldsMissing) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -355,7 +355,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderWrongFieldTypes) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -400,7 +400,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidValues) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -458,7 +458,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidHeaders) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -515,7 +515,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderNameWrongFieldTypes) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -559,7 +559,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInSameKeyBuilder) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "
@ -603,7 +603,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInDifferentKeyBuilders) {
EXPECT_THAT(
service_config.status().message(),
::testing::HasSubstr(
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:childPolicy error:field not present; "
"field:childPolicyConfigTargetFieldName error:field not present; "
"field:routeLookupConfig.cacheSizeBytes error:field not present; "

@ -213,7 +213,7 @@ const char
"\"headers\":{\"Metadata-Flavor\":\"Google\"}}";
const char
valid_url_external_account_creds_options_credential_source_with_qurey_params_format_text
valid_url_external_account_creds_options_credential_source_with_query_params_format_text
[] = "{\"url\":\"https://foo.com:5555/"
"path/to/url/creds?p1=v1&p2=v2\","
"\"headers\":{\"Metadata-Flavor\":\"Google\"}}";
@ -2122,7 +2122,7 @@ TEST_F(CredentialsTest, TestAuthMetadataContext) {
}
}
void validate_external_account_creds_token_exchage_request(
void validate_external_account_creds_token_exchange_request(
const grpc_http_request* request, const URI& request_uri,
absl::string_view body) {
// Check that the body is constructed properly.
@ -2154,7 +2154,7 @@ void validate_external_account_creds_token_exchage_request(
"Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=");
}
void validate_external_account_creds_token_exchage_request_with_url_encode(
void validate_external_account_creds_token_exchange_request_with_url_encode(
const grpc_http_request* request, const URI& uri, absl::string_view body) {
// Check that the body is constructed properly.
EXPECT_EQ(
@ -2214,7 +2214,7 @@ int external_acc_creds_serv_acc_imp_custom_lifetime_httpcli_post_success(
Timestamp /*deadline*/, grpc_closure* on_done,
grpc_http_response* response) {
if (uri.path() == "/token") {
validate_external_account_creds_token_exchage_request(request, uri, body);
validate_external_account_creds_token_exchange_request(request, uri, body);
*response = http_response(
200, valid_external_account_creds_token_exchange_response);
} else if (uri.path() == "/service_account_impersonation") {
@ -2233,7 +2233,7 @@ int external_account_creds_httpcli_post_success(
Timestamp /*deadline*/, grpc_closure* on_done,
grpc_http_response* response) {
if (uri.path() == "/token") {
validate_external_account_creds_token_exchage_request(request, uri, body);
validate_external_account_creds_token_exchange_request(request, uri, body);
*response = http_response(
200, valid_external_account_creds_token_exchange_response);
} else if (uri.path() == "/service_account_impersonation") {
@ -2243,7 +2243,7 @@ int external_account_creds_httpcli_post_success(
200,
valid_external_account_creds_service_account_impersonation_response);
} else if (uri.path() == "/token_url_encode") {
validate_external_account_creds_token_exchage_request_with_url_encode(
validate_external_account_creds_token_exchange_request_with_url_encode(
request, uri, body);
*response = http_response(
200, valid_external_account_creds_token_exchange_response);
@ -2291,7 +2291,7 @@ int url_external_account_creds_httpcli_get_success(
return 1;
}
void validate_aws_external_account_creds_token_exchage_request(
void validate_aws_external_account_creds_token_exchange_request(
const grpc_http_request* request, const URI& request_uri,
absl::string_view body) {
// Check that the regional_cred_verification_url got constructed
@ -2380,8 +2380,8 @@ int aws_external_account_creds_httpcli_post_success(
Timestamp /*deadline*/, grpc_closure* on_done,
grpc_http_response* response) {
if (uri.path() == "/token") {
validate_aws_external_account_creds_token_exchage_request(request, uri,
body);
validate_aws_external_account_creds_token_exchange_request(request, uri,
body);
*response = http_response(
200, valid_external_account_creds_token_exchange_response);
}
@ -3205,12 +3205,12 @@ TEST_F(ExternalAccountCredentialsTest,
}
TEST_F(ExternalAccountCredentialsTest,
UrlExternalAccountCredsSuccessWithQureyParamsFormatText) {
UrlExternalAccountCredsSuccessWithQueryParamsFormatText) {
std::map<std::string, std::string> emd = {
{"authorization", "Bearer token_exchange_access_token"}};
ExecCtx exec_ctx;
auto credential_source = JsonParse(
valid_url_external_account_creds_options_credential_source_with_qurey_params_format_text);
valid_url_external_account_creds_options_credential_source_with_query_params_format_text);
ASSERT_TRUE(credential_source.ok()) << credential_source.status();
TestExternalAccountCredentials::ServiceAccountImpersonation
service_account_impersonation;
@ -4469,7 +4469,7 @@ TEST_F(CredentialsTest, TestTlsCredentialsWithVerifierCompareFailure) {
grpc_channel_credentials_release(tls_creds_2);
}
TEST_F(CredentialsTest, TestXdsCredentialsCompareSucces) {
TEST_F(CredentialsTest, TestXdsCredentialsCompareSuccess) {
auto* insecure_creds = grpc_insecure_credentials_create();
auto* xds_creds_1 = grpc_xds_credentials_create(insecure_creds);
auto* xds_creds_2 = grpc_xds_credentials_create(insecure_creds);

@ -32,7 +32,7 @@
#include "test/core/test_util/port.h"
#include "test/core/test_util/test_config.h"
TEST(ServerChttp2, UnparseableTarget) {
TEST(ServerChttp2, UnparsableTarget) {
grpc_channel_args args = {0, nullptr};
grpc_server* server = grpc_server_create(&args, nullptr);
grpc_server_credentials* server_creds =

@ -3506,7 +3506,7 @@ TEST_F(XdsClientTest, FederationWithUnknownAuthority) {
<< *error;
}
TEST_F(XdsClientTest, FederationWithUnparseableXdstpResourceName) {
TEST_F(XdsClientTest, FederationWithUnparsableXdstpResourceName) {
// Note: Not adding authority to bootstrap config.
InitXdsClient();
// Start a watch for the xdstp resource name.

@ -136,7 +136,7 @@ TEST_F(XdsClusterTest, Definition) {
EXPECT_TRUE(resource_type->AllResourcesRequiredInSotW());
}
TEST_F(XdsClusterTest, UnparseableProto) {
TEST_F(XdsClusterTest, UnparsableProto) {
std::string serialized_resource("\0", 1);
auto* resource_type = XdsClusterResourceType::Get();
auto decode_result =
@ -586,7 +586,7 @@ TEST_F(ClusterTypeTest, AggregateClusterValid) {
::testing::ElementsAre("bar", "baz", "quux"));
}
TEST_F(ClusterTypeTest, AggregateClusterUnparseableProto) {
TEST_F(ClusterTypeTest, AggregateClusterUnparsableProto) {
Cluster cluster;
cluster.set_name("foo");
cluster.mutable_cluster_type()->set_name("envoy.clusters.aggregate");
@ -1031,7 +1031,7 @@ TEST_F(TlsConfigTest, UnknownTransportSocketType) {
<< decode_result.resource.status();
}
TEST_F(TlsConfigTest, UnparseableUpstreamTlsContext) {
TEST_F(TlsConfigTest, UnparsableUpstreamTlsContext) {
Cluster cluster;
cluster.set_name("foo");
cluster.set_type(cluster.EDS);
@ -1275,7 +1275,7 @@ TEST_F(UpstreamConfigTest, UnknownUpstreamConfigType) {
<< decode_result.resource.status();
}
TEST_F(UpstreamConfigTest, UnparseableHttpProtocolOptions) {
TEST_F(UpstreamConfigTest, UnparsableHttpProtocolOptions) {
Cluster cluster;
cluster.set_name("foo");
cluster.set_type(cluster.EDS);

@ -111,7 +111,7 @@ TEST_F(XdsEndpointTest, Definition) {
EXPECT_FALSE(resource_type->AllResourcesRequiredInSotW());
}
TEST_F(XdsEndpointTest, UnparseableProto) {
TEST_F(XdsEndpointTest, UnparsableProto) {
std::string serialized_resource("\0", 1);
auto* resource_type = XdsEndpointResourceType::Get();
auto decode_result =

@ -238,7 +238,7 @@ TEST_F(XdsRouterFilterTest, GenerateFilterConfigTypedStruct) {
<< status;
}
TEST_F(XdsRouterFilterTest, GenerateFilterConfigUnparseable) {
TEST_F(XdsRouterFilterTest, GenerateFilterConfigUnparsable) {
XdsExtension extension = MakeXdsExtension(Router());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -469,7 +469,7 @@ TEST_P(XdsFaultInjectionFilterConfigTest, TypedStruct) {
<< status;
}
TEST_P(XdsFaultInjectionFilterConfigTest, Unparseable) {
TEST_P(XdsFaultInjectionFilterConfigTest, Unparsable) {
XdsExtension extension = MakeXdsExtension(HTTPFault());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -544,7 +544,7 @@ TEST_F(XdsRbacFilterTest, GenerateFilterConfigTypedStruct) {
<< status;
}
TEST_F(XdsRbacFilterTest, GenerateFilterConfigUnparseable) {
TEST_F(XdsRbacFilterTest, GenerateFilterConfigUnparsable) {
XdsExtension extension = MakeXdsExtension(RBAC());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -587,7 +587,7 @@ TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideTypedStruct) {
<< status;
}
TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideUnparseable) {
TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideUnparsable) {
XdsExtension extension = MakeXdsExtension(RBACPerRoute());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -1219,7 +1219,7 @@ TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigTypedStruct) {
<< status;
}
TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigUnparseable) {
TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigUnparsable) {
XdsExtension extension = MakeXdsExtension(StatefulSession());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -1254,7 +1254,7 @@ TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideTypedStruct) {
<< status;
}
TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideUnparseable) {
TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideUnparsable) {
XdsExtension extension = MakeXdsExtension(StatefulSessionPerRoute());
std::string serialized_resource("\0", 1);
extension.value = absl::string_view(serialized_resource);
@ -1457,7 +1457,7 @@ TEST_P(XdsStatefulSessionFilterConfigTest, TypedStructSessionState) {
<< status;
}
TEST_P(XdsStatefulSessionFilterConfigTest, UnparseableSessionState) {
TEST_P(XdsStatefulSessionFilterConfigTest, UnparsableSessionState) {
StatefulSession stateful_session;
stateful_session.mutable_session_state()->mutable_typed_config()->PackFrom(
CookieBasedSessionState());

@ -134,7 +134,7 @@ TEST_F(XdsListenerTest, Definition) {
EXPECT_TRUE(resource_type->AllResourcesRequiredInSotW());
}
TEST_F(XdsListenerTest, UnparseableProto) {
TEST_F(XdsListenerTest, UnparsableProto) {
std::string serialized_resource("\0", 1);
auto* resource_type = XdsListenerResourceType::Get();
auto decode_result =
@ -911,7 +911,7 @@ TEST_F(ApiListenerTest, DoesNotContainHttpConnectionManager) {
<< decode_result.resource.status();
}
TEST_F(ApiListenerTest, UnparseableHttpConnectionManagerConfig) {
TEST_F(ApiListenerTest, UnparsableHttpConnectionManagerConfig) {
Listener listener;
listener.set_name("foo");
auto* any = listener.mutable_api_listener()->mutable_api_listener();
@ -1753,7 +1753,7 @@ TEST_F(TcpListenerTest, UnknownTransportSocketType) {
<< decode_result.resource.status();
}
TEST_F(TcpListenerTest, UnparseableDownstreamTlsContext) {
TEST_F(TcpListenerTest, UnparsableDownstreamTlsContext) {
Listener listener;
listener.set_name("foo");
HttpConnectionManager hcm;

@ -125,7 +125,7 @@ TEST_F(XdsRouteConfigTest, Definition) {
EXPECT_FALSE(resource_type->AllResourcesRequiredInSotW());
}
TEST_F(XdsRouteConfigTest, UnparseableProto) {
TEST_F(XdsRouteConfigTest, UnparsableProto) {
std::string serialized_resource("\0", 1);
auto* resource_type = XdsRouteConfigResourceType::Get();
auto decode_result =
@ -561,7 +561,7 @@ TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperInTypedStruct) {
<< decode_result.resource.status();
}
TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperUnparseable) {
TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperUnparsable) {
auto* typed_per_filter_config_proto =
GetTypedPerFilterConfigProto(&route_config_);
auto& any = (*typed_per_filter_config_proto)["fault"];
@ -2200,7 +2200,7 @@ TEST_F(RlsTest, InvalidGrpcLbPolicyConfig) {
"errors validating RouteConfiguration resource: ["
"field:cluster_specifier_plugins[0].extension.typed_config "
"error:ClusterSpecifierPlugin returned invalid LB policy config: "
"errors validing RLS LB policy config: ["
"errors validating RLS LB policy config: ["
"field:routeLookupConfig.lookupService error:field not present]]")
<< decode_result.resource.status();
}
@ -2237,7 +2237,7 @@ TEST_F(RlsTest, RlsInTypedStruct) {
<< decode_result.resource.status();
}
TEST_F(RlsTest, RlsConfigUnparseable) {
TEST_F(RlsTest, RlsConfigUnparsable) {
ScopedExperimentalEnvVar env_var("GRPC_EXPERIMENTAL_XDS_RLS_LB");
RouteConfiguration route_config;
route_config.set_name("foo");

@ -85,8 +85,8 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) {
std::string expected_rp("record protocol");
std::string expected_peer("peer");
std::string expected_local("local");
std::string expected_peer_atrributes_key("peer");
std::string expected_peer_atrributes_value("attributes");
std::string expected_peer_attributes_key("peer");
std::string expected_peer_attributes_value("attributes");
grpc_security_level expected_sl = GRPC_INTEGRITY_ONLY;
upb::Arena context_arena;
grpc_gcp_AltsContext* context = grpc_gcp_AltsContext_new(context_arena.ptr());
@ -105,10 +105,10 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) {
expected_local.length()));
grpc_gcp_AltsContext_peer_attributes_set(
context,
upb_StringView_FromDataAndSize(expected_peer_atrributes_key.data(),
expected_peer_atrributes_key.length()),
upb_StringView_FromDataAndSize(expected_peer_atrributes_value.data(),
expected_peer_atrributes_value.length()),
upb_StringView_FromDataAndSize(expected_peer_attributes_key.data(),
expected_peer_attributes_key.length()),
upb_StringView_FromDataAndSize(expected_peer_attributes_value.data(),
expected_peer_attributes_value.length()),
context_arena.ptr());
size_t serialized_ctx_length;
char* serialized_ctx = grpc_gcp_AltsContext_serialize(
@ -131,8 +131,8 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) {
EXPECT_EQ(0, rpc_protocol_versions.max_rpc_version.minor_version);
EXPECT_EQ(0, rpc_protocol_versions.min_rpc_version.major_version);
EXPECT_EQ(0, rpc_protocol_versions.min_rpc_version.minor_version);
EXPECT_EQ(expected_peer_atrributes_value,
alts_context->peer_attributes().at(expected_peer_atrributes_key));
EXPECT_EQ(expected_peer_attributes_value,
alts_context->peer_attributes().at(expected_peer_attributes_key));
}
TEST(AltsUtilTest, AuthContextWithGoodAltsContext) {

@ -108,7 +108,7 @@ TEST_P(CdsTest, InvalidClusterStillExistsIfPreviouslyCached) {
CheckRpcSendOk(DEBUG_LOCATION);
}
// Tests round robin is not implacted by the endpoint weight, and that the
// Tests round robin is not impacted by the endpoint weight, and that the
// localities in a locality map are picked according to their weights.
TEST_P(CdsTest, EndpointWeightDoesNotImpactWeightedRoundRobin) {
CreateAndStartBackends(2);
@ -507,7 +507,7 @@ TEST_P(EdsTest, IgnoresUnhealthyEndpoints) {
CreateAndStartBackends(2);
const size_t kNumRpcsPerAddress = 100;
auto endpoints = CreateEndpointsForBackends();
endpoints.push_back(MakeNonExistantEndpoint());
endpoints.push_back(MakeNonExistentEndpoint());
endpoints.back().health_status = HealthStatus::DRAINING;
EdsResourceArgs args({
{"locality0", std::move(endpoints), kDefaultLocalityWeight,
@ -607,12 +607,12 @@ TEST_P(EdsTest, AllServersUnreachableFailFast) {
const size_t kNumUnreachableServers = 5;
std::vector<EdsResourceArgs::Endpoint> endpoints;
for (size_t i = 0; i < kNumUnreachableServers; ++i) {
endpoints.emplace_back(MakeNonExistantEndpoint());
endpoints.emplace_back(MakeNonExistentEndpoint());
}
EdsResourceArgs args({{"locality0", std::move(endpoints)}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// The error shouldn't be DEADLINE_EXCEEDED because timeout is set to 5
// seconds, and we should disocver in that time that the target backend is
// seconds, and we should discover in that time that the target backend is
// down.
CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::UNAVAILABLE,
MakeConnectionFailureRegex(
@ -677,7 +677,7 @@ TEST_P(EdsTest, IgnoresDuplicateUpdates) {
// of the invalid cases.
TEST_P(EdsTest, NacksInvalidResource) {
EdsResourceArgs args({
{"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1},
{"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
const auto response_state = WaitForEdsNack(DEBUG_LOCATION);
@ -1179,10 +1179,10 @@ TEST_P(EdsAuthorityRewriteTest, AutoAuthorityRewrite) {
{
CreateEndpoint(0),
CreateEndpoint(1, ::envoy::config::core::v3::HealthStatus::UNKNOWN,
/*lb_weight=*/1, /*additional_backend_indxes=*/{},
/*lb_weight=*/1, /*additional_backend_indexes=*/{},
/*hostname=*/kAltAuthority1),
CreateEndpoint(2, ::envoy::config::core::v3::HealthStatus::UNKNOWN,
/*lb_weight=*/1, /*additional_backend_indxes=*/{},
/*lb_weight=*/1, /*additional_backend_indexes=*/{},
/*hostname=*/kAltAuthority2),
}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
@ -1219,7 +1219,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteWithoutEnvVar) {
EdsResourceArgs args(
{{"locality0",
{CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN,
/*lb_weight=*/1, /*additional_backend_indxes=*/{},
/*lb_weight=*/1, /*additional_backend_indexes=*/{},
/*hostname=*/kAltAuthority)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Send an RPC and check the authority seen on the server side.
@ -1249,7 +1249,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteIfServerNotTrustedInBootstrap) {
EdsResourceArgs args(
{{"locality0",
{CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN,
/*lb_weight=*/1, /*additional_backend_indxes=*/{},
/*lb_weight=*/1, /*additional_backend_indexes=*/{},
/*hostname=*/kAltAuthority)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Send an RPC and check the authority seen on the server side.
@ -1296,7 +1296,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteIfNotEnabledInRoute) {
EdsResourceArgs args(
{{"locality0",
{CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN,
/*lb_weight=*/1, /*additional_backend_indxes=*/{},
/*lb_weight=*/1, /*additional_backend_indexes=*/{},
/*hostname=*/kAltAuthority)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Send an RPC and check the authority seen on the server side.
@ -1383,12 +1383,12 @@ TEST_P(FailoverTest, DoesNotUseLocalityWithNoEndpoints) {
TEST_P(FailoverTest, Failover) {
CreateAndStartBackends(2);
EdsResourceArgs args({
{"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1},
{"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1},
{"locality1", CreateEndpointsForBackends(0, 1), kDefaultLocalityWeight,
2},
{"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight,
3},
{"locality3", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0},
{"locality3", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
WaitForBackend(DEBUG_LOCATION, 0, /*check_status=*/nullptr,
@ -1401,7 +1401,7 @@ TEST_P(FailoverTest, ReportsConnectingDuringFailover) {
CreateAndStartBackends(1);
// Priority 0 will be unreachable, so we'll use priority 1.
EdsResourceArgs args({
{"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0},
{"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0},
{"locality1", CreateEndpointsForBackends(), kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
@ -1458,8 +1458,8 @@ TEST_P(FailoverTest, SwitchBackToHigherPriority) {
TEST_P(FailoverTest, UpdateInitialUnavailable) {
CreateAndStartBackends(2);
EdsResourceArgs args({
{"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0},
{"locality1", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1},
{"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0},
{"locality1", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::UNAVAILABLE,
@ -1522,12 +1522,12 @@ TEST_P(FailoverTest, UpdatePriority) {
// Moves all localities in the current priority to a higher priority.
TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) {
CreateAndStartBackends(3);
auto non_existant_endpoint = MakeNonExistantEndpoint();
auto non_existent_endpoint = MakeNonExistentEndpoint();
// First update:
// - Priority 0 is locality 0, containing an unreachable backend.
// - Priority 1 is locality 1, containing backends 0 and 1.
EdsResourceArgs args({
{"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0},
{"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0},
{"locality1", CreateEndpointsForBackends(0, 2), kDefaultLocalityWeight,
1},
});
@ -1544,7 +1544,7 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) {
// - We add backend 2 to locality 1, just so we have a way to know
// when the update has been seen by the client.
args = EdsResourceArgs({
{"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0},
{"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0},
{"locality1", CreateEndpointsForBackends(0, 3), kDefaultLocalityWeight,
0},
});
@ -1558,13 +1558,13 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) {
// present but deactivated.
TEST_P(FailoverTest, PriorityChildNameChurn) {
CreateAndStartBackends(4);
auto non_existant_endpoint = MakeNonExistantEndpoint();
auto non_existent_endpoint = MakeNonExistentEndpoint();
// Initial update:
// - P0:locality0, child number 0 (unreachable)
// - P1:locality1, child number 1
// - P2:locality2, child number 2
EdsResourceArgs args({
{"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0},
{"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0},
{"locality1", CreateEndpointsForBackends(0, 1), kDefaultLocalityWeight,
1},
{"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight,
@ -1578,7 +1578,7 @@ TEST_P(FailoverTest, PriorityChildNameChurn) {
// - P2:locality3, child number 3 (new child)
// Child number 1 will be deactivated.
args = EdsResourceArgs({
{"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0},
{"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0},
{"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight,
1},
{"locality3", CreateEndpointsForBackends(2, 3), kDefaultLocalityWeight,
@ -1592,7 +1592,7 @@ TEST_P(FailoverTest, PriorityChildNameChurn) {
// - P2:locality3, child number 3
// Child number 1 will be deactivated.
args = EdsResourceArgs({
{"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0},
{"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0},
{"locality4", CreateEndpointsForBackends(3, 4), kDefaultLocalityWeight,
1},
{"locality3", CreateEndpointsForBackends(2, 3), kDefaultLocalityWeight,

@ -757,9 +757,9 @@ TEST_P(AggregateClusterTest, ReconfigEdsWhileLogicalDnsChildFails) {
// - Priority 0: locality0
// - Priority 1: locality1, locality2
EdsResourceArgs args1({
{"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0},
{"locality1", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1},
{"locality2", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1},
{"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0},
{"locality1", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1},
{"locality2", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(
BuildEdsResource(args1, kNewEdsService1Name));
@ -829,7 +829,7 @@ TEST_P(AggregateClusterTest, MultipleClustersWithSameLocalities) {
const char* kNewClusterName2 = "new_cluster_2";
const char* kNewEdsServiceName2 = "new_eds_service_name_2";
// Populate EDS resource for cluster 1 with unreachable endpoint.
EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(
BuildEdsResource(args1, kNewEdsServiceName1));
// Populate CDS resource for cluster 1.

@ -540,7 +540,7 @@ TEST_P(TimeoutTest, EdsSecondResourceNotPresentInRequest) {
EdsResourceArgs args({{"locality0", CreateEndpointsForBackends()}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
CheckRpcSendOk(DEBUG_LOCATION, 1, RpcOptions().set_timeout_ms(4000));
// New cluster that points to a non-existant EDS resource.
// New cluster that points to a non-existent EDS resource.
const char* kNewClusterName = "new_cluster_name";
Cluster cluster = default_cluster_;
cluster.set_name(kNewClusterName);

@ -476,11 +476,11 @@ class XdsEnd2endTest : public ::testing::TestWithParam<XdsTestType>,
size_t backend_idx,
::envoy::config::core::v3::HealthStatus health_status =
::envoy::config::core::v3::HealthStatus::UNKNOWN,
int lb_weight = 1, std::vector<size_t> additional_backend_indxes = {},
int lb_weight = 1, std::vector<size_t> additional_backend_indexes = {},
absl::string_view hostname = "") {
std::vector<int> additional_ports;
additional_ports.reserve(additional_backend_indxes.size());
for (size_t idx : additional_backend_indxes) {
additional_ports.reserve(additional_backend_indexes.size());
for (size_t idx : additional_backend_indexes) {
additional_ports.push_back(backends_[idx]->port());
}
return EdsResourceArgs::Endpoint(backends_[backend_idx]->port(),
@ -498,7 +498,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam<XdsTestType>,
// Returns an endpoint for an unused port, for use in constructing an
// EDS resource.
EdsResourceArgs::Endpoint MakeNonExistantEndpoint() {
EdsResourceArgs::Endpoint MakeNonExistentEndpoint() {
return EdsResourceArgs::Endpoint(grpc_pick_unused_port_or_die());
}
@ -748,7 +748,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam<XdsTestType>,
const RpcOptions& rpc_options = RpcOptions());
// Sends num_rpcs RPCs, counting how many of them fail with a message
// matching the specfied expected_message_prefix.
// matching the specified expected_message_prefix.
// Any failure with a non-matching status or message is a test failure.
size_t SendRpcsAndCountFailuresWithMessage(
const grpc_core::DebugLocation& debug_location, size_t num_rpcs,
@ -944,7 +944,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam<XdsTestType>,
// sigma (standard deviation) to cover the probability area of 99.99994%. In
// another word, for a sample with size "n" probability "p" error-tolerance
// "k", we want the error always land within 5.00 sigma. The sigma of
// binominal distribution and be computed as sqrt(np(1-p)). Hence, we have
// binomial distribution and be computed as sqrt(np(1-p)). Hence, we have
// the equation:
//
// kn <= 5.00 * sqrt(np(1-p))

@ -108,7 +108,7 @@ INSTANTIATE_TEST_SUITE_P(
TEST_P(FaultInjectionTest, XdsFaultInjectionAlwaysAbort) {
const uint32_t kAbortPercentagePerHundred = 100;
// Create an EDS resource
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Construct the fault injection filter config
HTTPFault http_fault;

@ -266,7 +266,7 @@ TEST_P(OutlierDetectionTest, SuccessRateStdevFactor) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(
3000 * grpc_test_slowdown_factor()));
ResetBackendCounters();
// 1 backend experenced failure, but since the stdev_factor is high, no
// 1 backend experienced failure, but since the stdev_factor is high, no
// backend will be noticed as an outlier so no ejection.
// Both backends are still getting the RPCs intended for them.
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options);
@ -326,9 +326,9 @@ TEST_P(OutlierDetectionTest, SuccessRateEnforcementPercentage) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(
3000 * grpc_test_slowdown_factor()));
ResetBackendCounters();
// 1 backend experenced failure, but since the enforcement percentage is 0, no
// backend will be ejected.
// Both backends are still getting the RPCs intended for them.
// 1 backend experienced failure, but since the enforcement percentage is 0,
// no backend will be ejected. Both backends are still getting the RPCs
// intended for them.
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options);
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1);
EXPECT_EQ(100, backends_[0]->backend_service()->request_count());
@ -677,7 +677,7 @@ TEST_P(OutlierDetectionTest, FailurePercentageThreshold) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(
3000 * grpc_test_slowdown_factor()));
ResetBackendCounters();
// 1 backend experenced 1 failure, but since the threshold is 50 % no
// 1 backend experienced 1 failure, but since the threshold is 50 % no
// backend will be noticed as an outlier so no ejection.
// Both backends are still getting the RPCs intended for them.
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options);
@ -738,9 +738,9 @@ TEST_P(OutlierDetectionTest, FailurePercentageEnforcementPercentage) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(
3000 * grpc_test_slowdown_factor()));
ResetBackendCounters();
// 1 backend experenced failure, but since the enforcement percentage is 0, no
// backend will be ejected.
// Both backends are still getting the RPCs intended for them.
// 1 backend experienced failure, but since the enforcement percentage is 0,
// no backend will be ejected. Both backends are still getting the RPCs
// intended for them.
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options);
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1);
EXPECT_EQ(100, backends_[0]->backend_service()->request_count());
@ -935,7 +935,7 @@ TEST_P(OutlierDetectionTest, SuccessRateAndFailurePercentage) {
// Cause 2 errors on 1 backend and 1 error on 2 backends and wait for 2
// backends to be ejected. The 2 errors to the 1 backend will make exactly 1
// outlier from the success rate algorithm; all 4 errors will make 3 outliers
// from the failure pecentage algorithm because the threahold is set to 0. I
// from the failure percentage algorithm because the threshold is set to 0. I
// have verified through debug logs we eject 1 backend because of success
// rate, 1 backend because of failure percentage; but as we attempt to eject
// another backend because of failure percentage we will stop as we have
@ -1037,7 +1037,7 @@ TEST_P(OutlierDetectionTest, SuccessRateAndFailurePercentageBothDisabled) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(
3000 * grpc_test_slowdown_factor()));
ResetBackendCounters();
// 1 backend experenced failure, but since there is no counting there is no
// 1 backend experienced failure, but since there is no counting there is no
// ejection. Both backends are still getting the RPCs intended for them.
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options);
CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1);
@ -1136,7 +1136,7 @@ TEST_P(OutlierDetectionTest, EjectionRetainedAcrossPriorities) {
// Priority 0: backend 0 and a non-existent backend.
// Priority 1: backend 1.
EdsResourceArgs args({
{"locality0", {CreateEndpoint(0), MakeNonExistantEndpoint()}},
{"locality0", {CreateEndpoint(0), MakeNonExistentEndpoint()}},
{"locality1", {CreateEndpoint(1)}, kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
@ -1156,7 +1156,7 @@ TEST_P(OutlierDetectionTest, EjectionRetainedAcrossPriorities) {
// Now send an EDS update that moves backend 0 to priority 1.
// We also add backend 2, so that we know when the client sees the update.
args = EdsResourceArgs({
{"locality0", {MakeNonExistantEndpoint()}},
{"locality0", {MakeNonExistentEndpoint()}},
{"locality1", CreateEndpointsForBackends(), kDefaultLocalityWeight, 1},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));

@ -105,7 +105,7 @@ TEST_P(RingHashTest, AggregateClusterFallBackFromRingHashAtStartup) {
const char* kNewEdsService2Name = "new_eds_service_name_2";
// Populate new EDS resources.
EdsResourceArgs args1({
{"locality0", {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}},
{"locality0", {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}},
});
EdsResourceArgs args2({
{"locality0", CreateEndpointsForBackends()},
@ -166,11 +166,11 @@ TEST_P(RingHashTest,
// Populate EDS resource.
EdsResourceArgs args({
{"locality0",
{MakeNonExistantEndpoint(), MakeNonExistantEndpoint()},
{MakeNonExistentEndpoint(), MakeNonExistentEndpoint()},
kDefaultLocalityWeight,
0},
{"locality1",
{MakeNonExistantEndpoint(), MakeNonExistantEndpoint()},
{MakeNonExistentEndpoint(), MakeNonExistentEndpoint()},
kDefaultLocalityWeight,
1},
});
@ -234,11 +234,11 @@ TEST_P(RingHashTest,
// Populate EDS resource.
EdsResourceArgs args({
{"locality0",
{MakeNonExistantEndpoint(), MakeNonExistantEndpoint()},
{MakeNonExistentEndpoint(), MakeNonExistentEndpoint()},
kDefaultLocalityWeight,
0},
{"locality1",
{MakeNonExistantEndpoint(), MakeNonExistantEndpoint()},
{MakeNonExistentEndpoint(), MakeNonExistentEndpoint()},
kDefaultLocalityWeight,
1},
});
@ -786,9 +786,9 @@ TEST_P(RingHashTest, IdleToReady) {
TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) {
// Create EDS resource.
CreateAndStartBackends(1);
auto non_existant_endpoint = MakeNonExistantEndpoint();
auto non_existent_endpoint = MakeNonExistentEndpoint();
EdsResourceArgs args(
{{"locality0", {non_existant_endpoint, CreateEndpoint(0)}}});
{{"locality0", {non_existent_endpoint, CreateEndpoint(0)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Change CDS resource to use RING_HASH.
auto cluster = default_cluster_;
@ -804,12 +804,12 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) {
// Start connection attempt injector and add a hold for the P0
// connection attempt.
ConnectionAttemptInjector injector;
auto hold = injector.AddHold(non_existant_endpoint.port);
auto hold = injector.AddHold(non_existent_endpoint.port);
// A long-running RPC, just used to send the RPC in another thread.
LongRunningRpc rpc;
std::vector<std::pair<std::string, std::string>> metadata = {
{"address_hash",
CreateMetadataValueThatHashesToBackendPort(non_existant_endpoint.port)}};
CreateMetadataValueThatHashesToBackendPort(non_existent_endpoint.port)}};
rpc.StartRpc(stub_.get(), RpcOptions().set_timeout_ms(0).set_metadata(
std::move(metadata)));
// Wait for the RPC to trigger the P0 connection attempt, then cancel it,
@ -829,12 +829,12 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) {
TEST_P(RingHashTest, ContinuesConnectingWithoutPicksOneSubchannelAtATime) {
// Create EDS resource.
CreateAndStartBackends(1);
auto non_existant_endpoint0 = MakeNonExistantEndpoint();
auto non_existant_endpoint1 = MakeNonExistantEndpoint();
auto non_existant_endpoint2 = MakeNonExistantEndpoint();
auto non_existent_endpoint0 = MakeNonExistentEndpoint();
auto non_existent_endpoint1 = MakeNonExistentEndpoint();
auto non_existent_endpoint2 = MakeNonExistentEndpoint();
EdsResourceArgs args({{"locality0",
{non_existant_endpoint0, non_existant_endpoint1,
non_existant_endpoint2, CreateEndpoint(0)}}});
{non_existent_endpoint0, non_existent_endpoint1,
non_existent_endpoint2, CreateEndpoint(0)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// Change CDS resource to use RING_HASH.
auto cluster = default_cluster_;
@ -849,59 +849,59 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicksOneSubchannelAtATime) {
new_route_config);
// Start connection attempt injector.
ConnectionAttemptInjector injector;
auto hold_non_existant0 = injector.AddHold(non_existant_endpoint0.port);
auto hold_non_existant1 = injector.AddHold(non_existant_endpoint1.port);
auto hold_non_existant2 = injector.AddHold(non_existant_endpoint2.port);
auto hold_non_existent0 = injector.AddHold(non_existent_endpoint0.port);
auto hold_non_existent1 = injector.AddHold(non_existent_endpoint1.port);
auto hold_non_existent2 = injector.AddHold(non_existent_endpoint2.port);
auto hold_good = injector.AddHold(backends_[0]->port());
// A long-running RPC, just used to send the RPC in another thread.
LongRunningRpc rpc;
std::vector<std::pair<std::string, std::string>> metadata = {
{"address_hash", CreateMetadataValueThatHashesToBackendPort(
non_existant_endpoint0.port)}};
non_existent_endpoint0.port)}};
rpc.StartRpc(stub_.get(), RpcOptions().set_timeout_ms(0).set_metadata(
std::move(metadata)));
// Wait for the RPC to trigger a connection attempt to the first address,
// then cancel the RPC. No other connection attempts should be started yet.
hold_non_existant0->Wait();
hold_non_existent0->Wait();
rpc.CancelRpc();
EXPECT_FALSE(hold_non_existant1->IsStarted());
EXPECT_FALSE(hold_non_existant2->IsStarted());
EXPECT_FALSE(hold_non_existent1->IsStarted());
EXPECT_FALSE(hold_non_existent2->IsStarted());
EXPECT_FALSE(hold_good->IsStarted());
// Allow the connection attempt to the first address to resume and wait
// for the attempt for the second address. No other connection
// attempts should be started yet.
auto hold_non_existant0_again = injector.AddHold(non_existant_endpoint0.port);
hold_non_existant0->Resume();
hold_non_existant1->Wait();
EXPECT_FALSE(hold_non_existant0_again->IsStarted());
EXPECT_FALSE(hold_non_existant2->IsStarted());
auto hold_non_existent0_again = injector.AddHold(non_existent_endpoint0.port);
hold_non_existent0->Resume();
hold_non_existent1->Wait();
EXPECT_FALSE(hold_non_existent0_again->IsStarted());
EXPECT_FALSE(hold_non_existent2->IsStarted());
EXPECT_FALSE(hold_good->IsStarted());
// Allow the connection attempt to the second address to resume and wait
// for the attempt for the third address. No other connection
// attempts should be started yet.
auto hold_non_existant1_again = injector.AddHold(non_existant_endpoint1.port);
hold_non_existant1->Resume();
hold_non_existant2->Wait();
EXPECT_FALSE(hold_non_existant0_again->IsStarted());
EXPECT_FALSE(hold_non_existant1_again->IsStarted());
auto hold_non_existent1_again = injector.AddHold(non_existent_endpoint1.port);
hold_non_existent1->Resume();
hold_non_existent2->Wait();
EXPECT_FALSE(hold_non_existent0_again->IsStarted());
EXPECT_FALSE(hold_non_existent1_again->IsStarted());
EXPECT_FALSE(hold_good->IsStarted());
// Allow the connection attempt to the third address to resume and wait
// for the attempt for the final address. No other connection
// attempts should be started yet.
auto hold_non_existant2_again = injector.AddHold(non_existant_endpoint2.port);
hold_non_existant2->Resume();
auto hold_non_existent2_again = injector.AddHold(non_existent_endpoint2.port);
hold_non_existent2->Resume();
hold_good->Wait();
EXPECT_FALSE(hold_non_existant0_again->IsStarted());
EXPECT_FALSE(hold_non_existant1_again->IsStarted());
EXPECT_FALSE(hold_non_existant2_again->IsStarted());
EXPECT_FALSE(hold_non_existent0_again->IsStarted());
EXPECT_FALSE(hold_non_existent1_again->IsStarted());
EXPECT_FALSE(hold_non_existent2_again->IsStarted());
// Allow the final attempt to resume.
hold_good->Resume();
// Wait for channel to become connected without any pending RPC.
EXPECT_TRUE(channel_->WaitForConnected(grpc_timeout_seconds_to_deadline(10)));
// No other connection attempts should have been started.
EXPECT_FALSE(hold_non_existant0_again->IsStarted());
EXPECT_FALSE(hold_non_existant1_again->IsStarted());
EXPECT_FALSE(hold_non_existant2_again->IsStarted());
EXPECT_FALSE(hold_non_existent0_again->IsStarted());
EXPECT_FALSE(hold_non_existent1_again->IsStarted());
EXPECT_FALSE(hold_non_existent2_again->IsStarted());
// RPC should have been cancelled.
EXPECT_EQ(StatusCode::CANCELLED, rpc.GetStatus().error_code());
// Make sure the backend did not get any requests.
@ -940,7 +940,7 @@ TEST_P(RingHashTest, TransientFailureCheckNextOne) {
// Test that when a backend goes down, we will move on to the next subchannel
// (with a lower priority). When the backend comes back up, traffic will move
// back.
TEST_P(RingHashTest, SwitchToLowerPrioirtyAndThenBack) {
TEST_P(RingHashTest, SwitchToLowerPriorityAndThenBack) {
CreateAndStartBackends(2);
auto cluster = default_cluster_;
cluster.set_lb_policy(Cluster::RING_HASH);
@ -990,7 +990,7 @@ TEST_P(RingHashTest, ReattemptWhenAllEndpointsUnreachable) {
SetListenerAndRouteConfiguration(balancer_.get(), default_listener_,
new_route_config);
EdsResourceArgs args(
{{"locality0", {MakeNonExistantEndpoint(), CreateEndpoint(0)}}});
{{"locality0", {MakeNonExistentEndpoint(), CreateEndpoint(0)}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
std::vector<std::pair<std::string, std::string>> metadata = {
{"address_hash", CreateMetadataValueThatHashesToBackend(0)}};
@ -1024,8 +1024,8 @@ TEST_P(RingHashTest, TransientFailureSkipToAvailableReady) {
// Make sure we include some unused ports to fill the ring.
EdsResourceArgs args({
{"locality0",
{CreateEndpoint(0), CreateEndpoint(1), MakeNonExistantEndpoint(),
MakeNonExistantEndpoint()}},
{CreateEndpoint(0), CreateEndpoint(1), MakeNonExistentEndpoint(),
MakeNonExistentEndpoint()}},
});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
std::vector<std::pair<std::string, std::string>> metadata = {
@ -1124,7 +1124,7 @@ TEST_P(RingHashTest, ReattemptWhenGoingFromTransientFailureToIdle) {
EXPECT_EQ(GRPC_CHANNEL_READY, channel_->GetState(false));
}
// Test unspported hash policy types are all ignored before a supported
// Test unsupported hash policy types are all ignored before a supported
// policy.
TEST_P(RingHashTest, UnsupportedHashPolicyUntilChannelIdHashing) {
CreateAndStartBackends(2);

@ -472,7 +472,7 @@ TEST_P(LdsRdsTest, ChooseLastRoute) {
}
TEST_P(LdsRdsTest, NoMatchingRoute) {
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
RouteConfiguration route_config = default_route_config_;
route_config.mutable_virtual_hosts(0)
@ -531,7 +531,7 @@ TEST_P(LdsRdsTest, NacksInvalidRouteConfig) {
// Tests that LDS client should fail RPCs with UNAVAILABLE status code if the
// matching route has an action other than RouteAction.
TEST_P(LdsRdsTest, MatchingRouteHasNoRouteAction) {
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
RouteConfiguration route_config = default_route_config_;
// Set a route with an inappropriate route action
@ -1548,10 +1548,10 @@ TEST_P(LdsRdsTest, XdsRoutingApplyXdsTimeout) {
const char* kNewCluster3Name = "new_cluster_3";
const char* kNewEdsService3Name = "new_eds_service_name_3";
// Populate new EDS resources.
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args2({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args3({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}});
EdsResourceArgs args2({{"locality0", {MakeNonExistentEndpoint()}}});
EdsResourceArgs args3({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
balancer_->ads_service()->SetEdsResource(
BuildEdsResource(args1, kNewEdsService1Name));
@ -1661,9 +1661,9 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenXdsTimeoutExplicit) {
const char* kNewCluster2Name = "new_cluster_2";
const char* kNewEdsService2Name = "new_eds_service_name_2";
// Populate new EDS resources.
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args2({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}});
EdsResourceArgs args2({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
balancer_->ads_service()->SetEdsResource(
BuildEdsResource(args1, kNewEdsService1Name));
@ -1749,7 +1749,7 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenXdsTimeoutExplicit) {
TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenHttpTimeoutExplicit) {
const auto kTimeoutApplication = grpc_core::Duration::Milliseconds(4500);
// Populate new EDS resources.
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
auto listener = default_listener_;
HttpConnectionManager http_connection_manager;
@ -1784,7 +1784,7 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenHttpTimeoutExplicit) {
TEST_P(LdsRdsTest, XdsRoutingWithOnlyApplicationTimeout) {
const auto kTimeoutApplication = grpc_core::Duration::Milliseconds(4500);
// Populate new EDS resources.
EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}});
EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
auto t0 = system_clock::now();
CheckRpcSendFailure(

@ -40,7 +40,7 @@ namespace {
// then back to json. This ensures that the json string was correctly formatted
// according to https://developers.google.com/protocol-buffers/docs/proto3#json
template <typename Message>
void VaidateProtoJsonTranslation(absl::string_view json_str) {
void ValidateProtoJsonTranslation(absl::string_view json_str) {
Message msg;
grpc::protobuf::json::JsonParseOptions parse_options;
// If the following line is failing, then uncomment the last line of the
@ -73,42 +73,42 @@ void VaidateProtoJsonTranslation(absl::string_view json_str) {
namespace testing {
void ValidateChannelTraceProtoJsonTranslation(absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::ChannelTrace>(json_string);
ValidateProtoJsonTranslation<grpc::channelz::v1::ChannelTrace>(json_string);
}
void ValidateChannelProtoJsonTranslation(absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::Channel>(json_string);
ValidateProtoJsonTranslation<grpc::channelz::v1::Channel>(json_string);
}
void ValidateGetTopChannelsResponseProtoJsonTranslation(
absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::GetTopChannelsResponse>(
ValidateProtoJsonTranslation<grpc::channelz::v1::GetTopChannelsResponse>(
json_string);
}
void ValidateGetChannelResponseProtoJsonTranslation(
absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::GetChannelResponse>(
ValidateProtoJsonTranslation<grpc::channelz::v1::GetChannelResponse>(
json_string);
}
void ValidateGetServerResponseProtoJsonTranslation(
absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::GetServerResponse>(
ValidateProtoJsonTranslation<grpc::channelz::v1::GetServerResponse>(
json_string);
}
void ValidateSubchannelProtoJsonTranslation(absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::Subchannel>(json_string);
ValidateProtoJsonTranslation<grpc::channelz::v1::Subchannel>(json_string);
}
void ValidateServerProtoJsonTranslation(absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::Server>(json_string);
ValidateProtoJsonTranslation<grpc::channelz::v1::Server>(json_string);
}
void ValidateGetServersResponseProtoJsonTranslation(
absl::string_view json_string) {
VaidateProtoJsonTranslation<grpc::channelz::v1::GetServersResponse>(
ValidateProtoJsonTranslation<grpc::channelz::v1::GetServersResponse>(
json_string);
}

@ -178,9 +178,9 @@ class ChannelzSampler final {
return get_socket_response.socket();
}
// get the descedent channels/subchannels/sockets of a channel
// push descedent channels/subchannels to queue for layer traverse
// store descedent channels/subchannels/sockets for dumping data
// get the descendant channels/subchannels/sockets of a channel
// push descendant channels/subchannels to queue for layer traverse
// store descendant channels/subchannels/sockets for dumping data
void GetChannelDescedence(
const grpc::channelz::v1::Channel& channel,
std::queue<grpc::channelz::v1::Channel>& channel_queue,
@ -232,9 +232,9 @@ class ChannelzSampler final {
std::cout << std::endl;
}
// get the descedent channels/subchannels/sockets of a subchannel
// push descedent channels/subchannels to queue for layer traverse
// store descedent channels/subchannels/sockets for dumping data
// get the descendant channels/subchannels/sockets of a subchannel
// push descendant channels/subchannels to queue for layer traverse
// store descendant channels/subchannels/sockets for dumping data
void GetSubchannelDescedence(
grpc::channelz::v1::Subchannel& subchannel,
std::queue<grpc::channelz::v1::Channel>& channel_queue,

Loading…
Cancel
Save