aboutsummaryrefslogtreecommitdiff
path: root/test/core/end2end/tests/cancel_after_invoke.cc
diff options
context:
space:
mode:
authorKrzysztof KosiƄski <krzysio@google.com>2024-02-23 02:35:29 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2024-02-23 02:35:29 +0000
commitd53c80d78835e4465edd59e8ea19c259d05ec54b (patch)
treea0da8416687a507faab2c3de09a7791d4255189e /test/core/end2end/tests/cancel_after_invoke.cc
parent7f52fa8c3060b403b3ce1181d4e636f720f891f9 (diff)
parentd0ea8b5e8030562cfe6a6be629b9149f8700523b (diff)
downloadgrpc-grpc-d53c80d78835e4465edd59e8ea19c259d05ec54b.tar.gz
Upgrade gRPC to version 1.61.1. am: d0ea8b5e80
Original change: https://android-review.googlesource.com/c/platform/external/grpc-grpc/+/2972751 Change-Id: I0e12d02c8be49fdf7d73f148c15531b144eff74e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'test/core/end2end/tests/cancel_after_invoke.cc')
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.cc55
1 files changed, 30 insertions, 25 deletions
diff --git a/test/core/end2end/tests/cancel_after_invoke.cc b/test/core/end2end/tests/cancel_after_invoke.cc
index 24d8d9e6ff..5a1c8c9280 100644
--- a/test/core/end2end/tests/cancel_after_invoke.cc
+++ b/test/core/end2end/tests/cancel_after_invoke.cc
@@ -29,12 +29,14 @@
namespace grpc_core {
namespace {
-const Duration kTimeout = Duration::Seconds(2);
+const Duration kCancelTimeout = Duration::Seconds(20);
+const Duration kDeadlineTimeout = Duration::Seconds(2);
} // namespace
void CancelAfterInvoke6(CoreEnd2endTest& test,
- std::unique_ptr<CancellationMode> mode) {
- auto c = test.NewClientCall("/service/method").Timeout(kTimeout).Create();
+ std::unique_ptr<CancellationMode> mode,
+ Duration timeout) {
+ auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
CoreEnd2endTest::IncomingMessage server_message;
@@ -53,8 +55,9 @@ void CancelAfterInvoke6(CoreEnd2endTest& test,
}
void CancelAfterInvoke5(CoreEnd2endTest& test,
- std::unique_ptr<CancellationMode> mode) {
- auto c = test.NewClientCall("/service/method").Timeout(kTimeout).Create();
+ std::unique_ptr<CancellationMode> mode,
+ Duration timeout) {
+ auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
c.NewBatch(1)
@@ -71,8 +74,9 @@ void CancelAfterInvoke5(CoreEnd2endTest& test,
}
void CancelAfterInvoke4(CoreEnd2endTest& test,
- std::unique_ptr<CancellationMode> mode) {
- auto c = test.NewClientCall("/service/method").Timeout(kTimeout).Create();
+ std::unique_ptr<CancellationMode> mode,
+ Duration timeout) {
+ auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
c.NewBatch(1)
@@ -88,8 +92,9 @@ void CancelAfterInvoke4(CoreEnd2endTest& test,
}
void CancelAfterInvoke3(CoreEnd2endTest& test,
- std::unique_ptr<CancellationMode> mode) {
- auto c = test.NewClientCall("/service/method").Timeout(kTimeout).Create();
+ std::unique_ptr<CancellationMode> mode,
+ Duration timeout) {
+ auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
c.NewBatch(1)
@@ -104,43 +109,43 @@ void CancelAfterInvoke3(CoreEnd2endTest& test,
}
CORE_END2END_TEST(CoreEnd2endTest, CancelAfterInvoke6) {
- // TODO(vigneshbabu): re-enable these before release
- SKIP_IF_USES_EVENT_ENGINE_LISTENER();
- CancelAfterInvoke6(*this, std::make_unique<CancelCancellationMode>());
+ CancelAfterInvoke6(*this, std::make_unique<CancelCancellationMode>(),
+ kCancelTimeout);
}
CORE_END2END_TEST(CoreEnd2endTest, CancelAfterInvoke5) {
- // TODO(vigneshbabu): re-enable these before release
- SKIP_IF_USES_EVENT_ENGINE_LISTENER();
- CancelAfterInvoke5(*this, std::make_unique<CancelCancellationMode>());
+ CancelAfterInvoke5(*this, std::make_unique<CancelCancellationMode>(),
+ kCancelTimeout);
}
CORE_END2END_TEST(CoreEnd2endTest, CancelAfterInvoke4) {
- // TODO(vigneshbabu): re-enable these before release
- SKIP_IF_USES_EVENT_ENGINE_LISTENER();
- CancelAfterInvoke4(*this, std::make_unique<CancelCancellationMode>());
+ CancelAfterInvoke4(*this, std::make_unique<CancelCancellationMode>(),
+ kCancelTimeout);
}
CORE_END2END_TEST(CoreEnd2endTest, CancelAfterInvoke3) {
- // TODO(vigneshbabu): re-enable these before release
- SKIP_IF_USES_EVENT_ENGINE_LISTENER();
- CancelAfterInvoke3(*this, std::make_unique<CancelCancellationMode>());
+ CancelAfterInvoke3(*this, std::make_unique<CancelCancellationMode>(),
+ kCancelTimeout);
}
CORE_END2END_TEST(CoreDeadlineTest, DeadlineAfterInvoke6) {
- CancelAfterInvoke6(*this, std::make_unique<DeadlineCancellationMode>());
+ CancelAfterInvoke6(*this, std::make_unique<DeadlineCancellationMode>(),
+ kDeadlineTimeout);
}
CORE_END2END_TEST(CoreDeadlineTest, DeadlineAfterInvoke5) {
- CancelAfterInvoke5(*this, std::make_unique<DeadlineCancellationMode>());
+ CancelAfterInvoke5(*this, std::make_unique<DeadlineCancellationMode>(),
+ kDeadlineTimeout);
}
CORE_END2END_TEST(CoreDeadlineTest, DeadlineAfterInvoke4) {
- CancelAfterInvoke4(*this, std::make_unique<DeadlineCancellationMode>());
+ CancelAfterInvoke4(*this, std::make_unique<DeadlineCancellationMode>(),
+ kDeadlineTimeout);
}
CORE_END2END_TEST(CoreDeadlineTest, DeadlineAfterInvoke3) {
- CancelAfterInvoke3(*this, std::make_unique<DeadlineCancellationMode>());
+ CancelAfterInvoke3(*this, std::make_unique<DeadlineCancellationMode>(),
+ kDeadlineTimeout);
}
} // namespace grpc_core