Skip to content

Commit

Permalink
start testing, not all passing yet
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth committed Feb 1, 2025
1 parent e9f6e36 commit 0fc13f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/lib/surface/client_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void ClientCall::OnReceivedStatus(ServerMetadataHandle server_trailing_metadata,
server_trailing_metadata->get_pointer(GrpcDelayTracker());
delay_tracker != nullptr) {
message_slice = Slice::FromCopiedString(
absl::StrCat(message_slice.empty() ? "Deadline exceeded"
absl::StrCat(message_slice.empty() ? "Deadline Exceeded"
: message_slice.as_string_view(),
" (", delay_tracker->GetDelayInfo(), ")"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/surface/filter_stack_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ void FilterStackCall::RecvTrailingFilter(grpc_metadata_batch* b,
(delay_tracker = b->get_pointer(GrpcDelayTracker())) != nullptr) {
std::string msg = absl::StrCat(
grpc_message.has_value() ? grpc_message->as_string_view()
: "Deadline exceeded",
: "Deadline Exceeded",
" (", delay_tracker->GetDelayInfo(), ")");
error = grpc_error_set_str(error, StatusStrProperty::kGrpcMessage, msg);
} else if (grpc_message.has_value()) {
Expand Down
7 changes: 7 additions & 0 deletions test/core/end2end/tests/cancel_after_accept.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ void CancelAfterAccept(CoreEnd2endTest& test,
EXPECT_THAT(server_status.status(),
::testing::AnyOf(cancellation_mode->ExpectedStatus(),
GRPC_STATUS_INTERNAL));
if (server_status.status() == GRPC_STATUS_DEADLINE_EXCEEDED) {
EXPECT_THAT(
server_status.message(),
::testing::MatchesRegex(
"Deadline Exceeded \\(Name resolver delay [0-9]+ms; "
"retry attempt 0:\\[Load balancing delay [0-9]+ms\\]\\)"));
}
EXPECT_TRUE(client_close.was_cancelled());
}

Expand Down

0 comments on commit 0fc13f9

Please sign in to comment.