[test] Decrease ping timeout on CancelAfterInvoke tests (#35969)

Supersedes #35967

Closes #35969

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35969 from drfloob:land/35967 30a6947343
PiperOrigin-RevId: 609471457
pull/35968/head^2
AJ Heller 9 months ago committed by Copybara-Service
parent 84b0bb3d1c
commit 6fb93e79c2
  1. 4
      test/core/end2end/tests/cancel_after_invoke.cc
  2. 5
      test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc

@ -81,6 +81,8 @@ void CancelAfterInvoke5(CoreEnd2endTest& test,
void CancelAfterInvoke4(CoreEnd2endTest& test,
std::unique_ptr<CancellationMode> mode,
Duration timeout) {
test.InitClient(ChannelArgs());
test.InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
@ -99,6 +101,8 @@ void CancelAfterInvoke4(CoreEnd2endTest& test,
void CancelAfterInvoke3(CoreEnd2endTest& test,
std::unique_ptr<CancellationMode> mode,
Duration timeout) {
test.InitClient(ChannelArgs());
test.InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;

@ -20,6 +20,7 @@
#include <grpc/impl/channel_arg_names.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/time.h"
#include "test/core/end2end/end2end_tests.h"
@ -30,7 +31,7 @@ namespace {
// Tests that we can unref a call after the first attempt starts but
// before any ops complete. This should not cause a memory leak.
CORE_END2END_TEST(RetryTest, RetryCancelAfterFirstAttemptStarts) {
InitServer(ChannelArgs());
InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 4000));
InitClient(ChannelArgs().Set(
GRPC_ARG_SERVICE_CONFIG,
"{\n"
@ -48,7 +49,7 @@ CORE_END2END_TEST(RetryTest, RetryCancelAfterFirstAttemptStarts) {
" } ]\n"
"}"));
absl::optional<Call> c =
NewClientCall("/service/method").Timeout(Duration::Seconds(5)).Create();
NewClientCall("/service/method").Timeout(Duration::Seconds(6)).Create();
// Client starts send ops.
c->NewBatch(1)
.SendInitialMetadata({})

Loading…
Cancel
Save