add fix for retry_cancel_after_first_attempt

pull/35969/head
AJ Heller 1 year ago
parent 375f73b5a5
commit 30a6947343
  1. 5
      test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc

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

Loading…
Cancel
Save