File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include < userver/ugrpc/tests/service_fixtures.hpp>
8
8
9
+ #include < tests/deadline_helpers.hpp>
9
10
#include < tests/unit_test_client.usrv.pb.hpp>
10
11
#include < tests/unit_test_client_qos.hpp>
11
12
#include < tests/unit_test_service.usrv.pb.hpp>
@@ -28,7 +29,7 @@ class UnitTestService final : public sample::ugrpc::UnitTestServiceBase {
28
29
LOG_DEBUG () << request_counter_ << " request attempt: now=" << std::chrono::system_clock::now ()
29
30
<< " , deadline=" << context.GetServerContext ().deadline ();
30
31
if (++request_counter_ % 4 ) {
31
- engine::InterruptibleSleepFor (std::chrono::milliseconds{ 200 } );
32
+ engine::InterruptibleSleepFor (tests:: kShortTimeout + tests:: kAddSleep );
32
33
EXPECT_TRUE (context.GetServerContext ().IsCancelled ());
33
34
// this status should not reach client because of 'perAttemptRecvTimeout'
34
35
LOG_DEBUG () << request_counter_ << " : return ABORTED" ;
@@ -51,7 +52,7 @@ using TimeoutTest = ugrpc::tests::ServiceFixture<UnitTestService>;
51
52
UTEST_F (TimeoutTest, DISABLED_IN_OLD_GRPC_TEST_NAME(PerAttemptTimeout)) {
52
53
ugrpc::client::Qos qos;
53
54
qos.attempts = 4 ;
54
- qos.timeout = std::chrono::milliseconds{ 100 } ;
55
+ qos.timeout = tests:: kShortTimeout ;
55
56
ugrpc::client::ClientQos client_qos;
56
57
client_qos.SetDefault (qos);
57
58
const auto config = std::vector<dynamic_config::KeyValue>{{tests::kUnitTestClientQos , client_qos}};
You can’t perform that action at this time.
0 commit comments