Skip to content

Commit d9fe121

Browse files
authored
fix flaky tests (#13019)
1 parent a0e9dda commit d9fe121

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ydb/library/actors/http/http_ut.cpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Y_UNIT_TEST_SUITE(HttpProxy) {
308308
}
309309

310310
Y_UNIT_TEST(BasicRunning4) {
311-
NActors::TTestActorRuntimeBase actorSystem;
311+
NActors::TTestActorRuntimeBase actorSystem(1, true);
312312
TPortManager portManager;
313313
TIpPort port = portManager.GetTcpPort();
314314
TAutoPtr<NActors::IEventHandle> handle;
@@ -341,7 +341,7 @@ Y_UNIT_TEST_SUITE(HttpProxy) {
341341
}
342342

343343
Y_UNIT_TEST(BasicRunning6) {
344-
NActors::TTestActorRuntimeBase actorSystem;
344+
NActors::TTestActorRuntimeBase actorSystem(1, true);
345345
TPortManager portManager;
346346
TIpPort port = portManager.GetTcpPort();
347347
TAutoPtr<NActors::IEventHandle> handle;
@@ -374,7 +374,7 @@ Y_UNIT_TEST_SUITE(HttpProxy) {
374374
}
375375

376376
Y_UNIT_TEST(TlsRunning) {
377-
NActors::TTestActorRuntimeBase actorSystem;
377+
NActors::TTestActorRuntimeBase actorSystem(1, true);
378378
TPortManager portManager;
379379
TIpPort port = portManager.GetTcpPort();
380380
TAutoPtr<NActors::IEventHandle> handle;
@@ -492,12 +492,14 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
492492
}*/
493493

494494
Y_UNIT_TEST(TooLongHeader) {
495-
NActors::TTestActorRuntimeBase actorSystem;
496-
actorSystem.SetUseRealInterconnect();
495+
NActors::TTestActorRuntimeBase actorSystem(1, true);
497496
TPortManager portManager;
498497
TIpPort port = portManager.GetTcpPort();
499498
TAutoPtr<NActors::IEventHandle> handle;
500499
actorSystem.Initialize();
500+
#ifndef NDEBUG
501+
actorSystem.SetLogPriority(NActorsServices::HTTP, NActors::NLog::PRI_TRACE);
502+
#endif
501503

502504
NActors::IActor* proxy = NHttp::CreateHttpProxy();
503505
NActors::TActorId proxyId = actorSystem.Register(proxy);
@@ -522,7 +524,7 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
522524
}
523525

524526
Y_UNIT_TEST(HeaderWithoutAColon) {
525-
NActors::TTestActorRuntimeBase actorSystem;
527+
NActors::TTestActorRuntimeBase actorSystem(1, true);
526528
actorSystem.SetUseRealInterconnect();
527529
TPortManager portManager;
528530
TIpPort port = portManager.GetTcpPort();
@@ -615,7 +617,7 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
615617
}
616618

617619
Y_UNIT_TEST(ChunkedResponse1) {
618-
NActors::TTestActorRuntimeBase actorSystem;
620+
NActors::TTestActorRuntimeBase actorSystem(1, true);
619621
TPortManager portManager;
620622
TIpPort port = portManager.GetTcpPort();
621623
TAutoPtr<NActors::IEventHandle> handle;
@@ -660,7 +662,7 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
660662
}
661663

662664
Y_UNIT_TEST(ChunkedResponse2) {
663-
NActors::TTestActorRuntimeBase actorSystem;
665+
NActors::TTestActorRuntimeBase actorSystem(1, true);
664666
TPortManager portManager;
665667
TIpPort port = portManager.GetTcpPort();
666668
TAutoPtr<NActors::IEventHandle> handle;
@@ -703,13 +705,15 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
703705
}
704706

705707
Y_UNIT_TEST(ChunkedResponse3) {
706-
NActors::TTestActorRuntimeBase actorSystem;
708+
NActors::TTestActorRuntimeBase actorSystem(1, true);
707709
TPortManager portManager;
708710
TIpPort port = portManager.GetTcpPort();
709711
TAutoPtr<NActors::IEventHandle> handle;
710712
actorSystem.Initialize();
711713
#ifndef NDEBUG
712714
actorSystem.SetLogPriority(NActorsServices::HTTP, NActors::NLog::PRI_DEBUG);
715+
#else
716+
actorSystem.SetLogPriority(NActorsServices::HTTP, NActors::NLog::PRI_CRIT);
713717
#endif
714718

715719
NActors::IActor* proxy = NHttp::CreateHttpProxy();
@@ -746,12 +750,14 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V
746750
}
747751

748752
Y_UNIT_TEST(RequestAfter307) {
749-
NActors::TTestActorRuntimeBase actorSystem;
753+
NActors::TTestActorRuntimeBase actorSystem(1, true);
750754
TPortManager portManager;
751755
TIpPort port = portManager.GetTcpPort();
752756
TAutoPtr<NActors::IEventHandle> handle;
753757
actorSystem.Initialize();
758+
#ifndef NDEBUG
754759
actorSystem.SetLogPriority(NActorsServices::HTTP, NActors::NLog::PRI_TRACE);
760+
#endif
755761

756762
NActors::IActor* proxy = NHttp::CreateHttpProxy();
757763
NActors::TActorId proxyId = actorSystem.Register(proxy);

0 commit comments

Comments
 (0)