diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-31 14:21:15 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-31 14:30:34 +0300 |
commit | 58db65a7db991dbc19347cee58a69b86d1c818b6 (patch) | |
tree | db431e9d8265a31b390c11e7aaf4b1dc2b270eb0 | |
parent | a15e977fbc55604860f9e0ca1ae46a2b74f2ce96 (diff) | |
download | ydb-58db65a7db991dbc19347cee58a69b86d1c818b6.tar.gz |
Intermediate changes
-rw-r--r-- | yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp index d3377612db..d1056ab986 100644 --- a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp +++ b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp @@ -75,6 +75,21 @@ TEST(TReconfigurableThroughputThrottlerTest, TestNoOverflow) .ThrowOnError(); } +TEST(TReconfigurableThroughputThrottlerTest, FailedTest) +{ + auto config = NYT::New<NYT::NConcurrency::TThroughputThrottlerConfig>(); + config->Limit = 15; + config->Period = TDuration::Seconds(1) / 15; + + auto throttler = CreateReconfigurableThroughputThrottler(config); + + for (int i = 0; i < 10; ++i) { + throttler->Throttle(1).Get().ThrowOnError(); + Sleep(TDuration::Seconds(3)); + } + +} + TEST(TReconfigurableThroughputThrottlerTest, TestScheduleUpdate) { auto throttler = CreateReconfigurableThroughputThrottler( |