diff options
| author | xenoxeno <[email protected]> | 2022-07-11 16:34:43 +0300 |
|---|---|---|
| committer | xenoxeno <[email protected]> | 2022-07-11 16:34:43 +0300 |
| commit | aed66381a6e6c5cc24a2e6da3dc779814fa25ab2 (patch) | |
| tree | 097286c051ccd4d66697cbea724121d62ec1086d | |
| parent | f0b01fc4537618a0687f3155ebbad1293c23a4a0 (diff) | |
fix ut
| -rw-r--r-- | library/cpp/actors/http/http_ut.cpp | 1 | ||||
| -rw-r--r-- | ydb/core/mind/hive/hive_ut.cpp | 41 |
2 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/actors/http/http_ut.cpp b/library/cpp/actors/http/http_ut.cpp index 7a569a08c36..d7d4f5567f3 100644 --- a/library/cpp/actors/http/http_ut.cpp +++ b/library/cpp/actors/http/http_ut.cpp @@ -379,6 +379,7 @@ CRA/5XcX13GJwHHj6LCoc3sL7mt8qV9HKY2AOZ88mpObzISZxgPpdKCfjsrdm63V Y_UNIT_TEST(TooLongHeader) { NActors::TTestActorRuntimeBase actorSystem; + actorSystem.SetUseRealInterconnect(); TPortManager portManager; TIpPort port = portManager.GetTcpPort(); TAutoPtr<NActors::IEventHandle> handle; diff --git a/ydb/core/mind/hive/hive_ut.cpp b/ydb/core/mind/hive/hive_ut.cpp index c4686a90c7e..e20b07b98aa 100644 --- a/ydb/core/mind/hive/hive_ut.cpp +++ b/ydb/core/mind/hive/hive_ut.cpp @@ -3337,35 +3337,34 @@ Y_UNIT_TEST_SUITE(THiveTest) { SendKillLocal(runtime, 4); SendKillLocal(runtime, 5); - WaitForBootQueue(runtime, hiveTablet); - - //TDispatchOptions options; - //runtime.DispatchEvents(options, TDuration::MilliSeconds(1000)); - { int leaders = 0; int tablets = 0; - { - THolder<TEvHive::TEvRequestHiveInfo> request = MakeHolder<TEvHive::TEvRequestHiveInfo>(); - request->Record.SetReturnFollowers(true); - runtime.SendToPipe(hiveTablet, senderA, request.Release()); - TAutoPtr<IEventHandle> handle; - TEvHive::TEvResponseHiveInfo* response = runtime.GrabEdgeEventRethrow<TEvHive::TEvResponseHiveInfo>(handle); - for (const NKikimrHive::TTabletInfo& tablet : response->Record.GetTablets()) { - if (tablet.GetFollowerID() == 0) { - leaders++; + int iterations = 100; + while (--iterations > 0) { + leaders = 0; + tablets = 0; + { + THolder<TEvHive::TEvRequestHiveInfo> request = MakeHolder<TEvHive::TEvRequestHiveInfo>(); + request->Record.SetReturnFollowers(true); + runtime.SendToPipe(hiveTablet, senderA, request.Release()); + TAutoPtr<IEventHandle> handle; + TEvHive::TEvResponseHiveInfo* response = runtime.GrabEdgeEventRethrow<TEvHive::TEvResponseHiveInfo>(handle); + for (const NKikimrHive::TTabletInfo& tablet : response->Record.GetTablets()) { + if (tablet.GetFollowerID() == 0) { + leaders++; + } + tablets++; + Ctest << "tablet " << tablet.GetTabletID() << "." << tablet.GetFollowerID() << " on node " << tablet.GetNodeID() << Endl; } - tablets++; - Ctest << "tablet " << tablet.GetTabletID() << "." << tablet.GetFollowerID() << " on node " << tablet.GetNodeID() << Endl; } + if (leaders == 1 && tablets == 2) { + break; + } + runtime.DispatchEvents({}, TDuration::MilliSeconds(100)); } UNIT_ASSERT_VALUES_EQUAL(leaders, 1); UNIT_ASSERT_VALUES_EQUAL(tablets, 2); - // if (tablets != 2) { - // TDispatchOptions options; - // runtime.DispatchEvents(options, TDuration::MilliSeconds(1000)); - // UNIT_ASSERT(false); - // } } } |
