summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp15
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 d3377612dbe..d1056ab9865 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(