@@ -5845,12 +5845,13 @@ Y_UNIT_TEST_SUITE(THiveTest) {
58455845 UNIT_ASSERT_VALUES_EQUAL (result->Record .GetStatus (), expectedStatus);
58465846 }
58475847
5848- void VerifyLockTabletExecutionLost (TTestActorRuntime& runtime, ui64 tabletId, const TActorId& owner) {
5848+ void VerifyLockTabletExecutionLost (TTestActorRuntime& runtime, ui64 tabletId, const TActorId& owner, NKikimrHive::ELockLostReason reason ) {
58495849 TAutoPtr<IEventHandle> handle;
58505850 auto result = runtime.GrabEdgeEventRethrow <TEvHive::TEvLockTabletExecutionLost>(handle);
58515851 UNIT_ASSERT (result);
58525852 UNIT_ASSERT_VALUES_EQUAL (handle->GetRecipientRewrite (), owner);
58535853 UNIT_ASSERT_VALUES_EQUAL (result->Record .GetTabletID (), tabletId);
5854+ UNIT_ASSERT_VALUES_EQUAL (static_cast <i32 >(result->Record .GetReason ()), static_cast <i32 >(reason));
58545855 }
58555856
58565857 Y_UNIT_TEST (TestLockTabletExecution) {
@@ -5924,7 +5925,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
59245925 WaitForTabletIsUp (runtime, tabletId, 0 );
59255926
59265927 // Hive should try to notify owner on unlocking
5927- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
5928+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_NODE_DISCONNECTED );
59285929 }
59295930
59305931 Y_UNIT_TEST (TestLockTabletExecutionRebootTimeout) {
@@ -5953,7 +5954,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
59535954 WaitForTabletIsUp (runtime, tabletId, 0 );
59545955
59555956 // Hive should try to notify owner on unlocking
5956- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
5957+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_HIVE_RESTART );
59575958 }
59585959
59595960 Y_UNIT_TEST (TestLockTabletExecutionDelete) {
@@ -5989,7 +5990,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
59895990 }
59905991
59915992 // Hive should try to notify owner on unlocking
5992- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
5993+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_TABLET_DELETED );
59935994 }
59945995
59955996 Y_UNIT_TEST (TestLockTabletExecutionDeleteReboot) {
@@ -6030,7 +6031,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
60306031 RebootTablet (runtime, hiveTablet, runtime.AllocateEdgeActor (0 ));
60316032
60326033 // Hive should try to notify owner on unlocking
6033- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
6034+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_TABLET_DELETED );
60346035 }
60356036
60366037 void MakeSureTabletStaysDown (TTestActorRuntime& runtime, ui64 tabletId, const TDuration& timeout) {
@@ -6140,7 +6141,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
61406141 runtime.Send (new IEventHandle (proxy, disconnecter, new TEvInterconnect::TEvDisconnect ()), 0 );
61416142
61426143 // wait for the lost lock notification
6143- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
6144+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_NODE_DISCONNECTED );
61446145
61456146 // lock reconnect should fail
61466147 SendLockTabletExecution (runtime, hiveTablet, tabletId, 1 , NKikimrProto::ERROR, owner, 500 , true );
@@ -6210,7 +6211,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
62106211 WaitForTabletIsUp (runtime, tabletId, 0 );
62116212
62126213 // Hive should try to notify owner on unlocking
6213- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
6214+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_NO );
62146215 }
62156216
62166217 Y_UNIT_TEST (TestLockTabletExecutionStealLock) {
@@ -6236,7 +6237,7 @@ Y_UNIT_TEST_SUITE(THiveTest) {
62366237 SendLockTabletExecution (runtime, hiveTablet, tabletId, 1 , NKikimrProto::OK, owner2);
62376238
62386239 // Hive should notify the old owner on unlocking
6239- VerifyLockTabletExecutionLost (runtime, tabletId, owner);
6240+ VerifyLockTabletExecutionLost (runtime, tabletId, owner, NKikimrHive::LOCK_LOST_REASON_NEW_LOCK );
62406241 }
62416242
62426243 Y_UNIT_TEST (TestLockTabletExecutionLocalGone) {
0 commit comments