Skip to content

Commit 63ebf2d

Browse files
committed
try fix grpc timeout test
1 parent ff96568 commit 63ebf2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grpc/tests/timeout_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class UnitTestService final : public sample::ugrpc::UnitTestServiceBase {
2828
LOG_DEBUG() << request_counter_ << " request attempt: now=" << std::chrono::system_clock::now()
2929
<< ", deadline=" << context.GetServerContext().deadline();
3030
if (++request_counter_ % 4) {
31-
engine::InterruptibleSleepFor(std::chrono::milliseconds{200});
31+
engine::InterruptibleSleepFor(tests::kShortTimeout + tests::kAddSleep);
3232
EXPECT_TRUE(context.GetServerContext().IsCancelled());
3333
// this status should not reach client because of 'perAttemptRecvTimeout'
3434
LOG_DEBUG() << request_counter_ << ": return ABORTED";
@@ -51,7 +51,7 @@ using TimeoutTest = ugrpc::tests::ServiceFixture<UnitTestService>;
5151
UTEST_F(TimeoutTest, DISABLED_IN_OLD_GRPC_TEST_NAME(PerAttemptTimeout)) {
5252
ugrpc::client::Qos qos;
5353
qos.attempts = 4;
54-
qos.timeout = std::chrono::milliseconds{100};
54+
qos.timeout = tests::kShortTimeout;
5555
ugrpc::client::ClientQos client_qos;
5656
client_qos.SetDefault(qos);
5757
const auto config = std::vector<dynamic_config::KeyValue>{{tests::kUnitTestClientQos, client_qos}};

0 commit comments

Comments
 (0)