@@ -453,9 +453,10 @@ class TWorkloadServiceYdbSetup : public IYdbSetup {
453
453
auto subgroup = GetWorkloadManagerCounters (nodeIndex)
454
454
->GetSubgroup (" pool" , CanonizePath (TStringBuilder () << Settings_.DomainName_ << " /" << (poolId ? poolId : Settings_.PoolId_ )));
455
455
456
- CheckCommonCounters (subgroup);
456
+ const TString description = TStringBuilder () << " Node index: " << nodeIndex;
457
+ CheckCommonCounters (subgroup, description);
457
458
if (checkTableCounters) {
458
- CheckTableCounters (subgroup);
459
+ CheckTableCounters (subgroup, description );
459
460
}
460
461
}
461
462
}
@@ -497,21 +498,21 @@ class TWorkloadServiceYdbSetup : public IYdbSetup {
497
498
->GetSubgroup (" subsystem" , " workload_manager" );
498
499
}
499
500
500
- static void CheckCommonCounters (NMonitoring::TDynamicCounterPtr subgroup) {
501
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" LocalInFly" , false )->Val (), 0 );
502
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" LocalDelayedRequests" , false )->Val (), 0 );
503
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" ContinueOverloaded" , true )->Val (), 0 );
504
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" ContinueError" , true )->Val (), 0 );
505
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" CleanupError" , true )->Val (), 0 );
506
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" Cancelled" , true )->Val (), 0 );
501
+ static void CheckCommonCounters (NMonitoring::TDynamicCounterPtr subgroup, const TString& description ) {
502
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" LocalInFly" , false )->Val (), 0 , description );
503
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" LocalDelayedRequests" , false )->Val (), 0 , description );
504
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" ContinueOverloaded" , true )->Val (), 0 , description );
505
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" ContinueError" , true )->Val (), 0 , description );
506
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" CleanupError" , true )->Val (), 0 , description );
507
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" Cancelled" , true )->Val (), 0 , description );
507
508
508
- UNIT_ASSERT_GE (subgroup->GetCounter (" ContinueOk" , true )->Val (), 1 );
509
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" ContinueOk" , true )->Val (), subgroup->GetCounter (" CleanupOk" , true )->Val ());
509
+ UNIT_ASSERT_GE_C (subgroup->GetCounter (" ContinueOk" , true )->Val (), 1 , description );
510
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" ContinueOk" , true )->Val (), subgroup->GetCounter (" CleanupOk" , true )->Val (), description );
510
511
}
511
512
512
- static void CheckTableCounters (NMonitoring::TDynamicCounterPtr subgroup) {
513
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" PendingRequestsCount" , false )->Val (), 0 );
514
- UNIT_ASSERT_VALUES_EQUAL (subgroup->GetCounter (" FinishingRequestsCount" , false )->Val (), 0 );
513
+ static void CheckTableCounters (NMonitoring::TDynamicCounterPtr subgroup, const TString& description ) {
514
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" PendingRequestsCount" , false )->Val (), 0 , description );
515
+ UNIT_ASSERT_VALUES_EQUAL_C (subgroup->GetCounter (" FinishingRequestsCount" , false )->Val (), 0 , description );
515
516
516
517
const std::vector<std::pair<TString, bool >> tableQueries = {
517
518
{" TCleanupTablesQuery" , false },
@@ -524,9 +525,9 @@ class TWorkloadServiceYdbSetup : public IYdbSetup {
524
525
for (const auto & [operation, runExpected] : tableQueries) {
525
526
auto operationSubgroup = subgroup->GetSubgroup (" operation" , operation);
526
527
527
- UNIT_ASSERT_VALUES_EQUAL_C (operationSubgroup->GetCounter (" FinishError" , true )->Val (), 0 , TStringBuilder () << " Unexpected vaule for operation " << operation);
528
+ UNIT_ASSERT_VALUES_EQUAL_C (operationSubgroup->GetCounter (" FinishError" , true )->Val (), 0 , TStringBuilder () << description << " , unexpected vaule for operation " << operation);
528
529
if (runExpected) {
529
- UNIT_ASSERT_GE_C (operationSubgroup->GetCounter (" FinishOk" , true )->Val (), 1 , TStringBuilder () << " Unexpected vaule for operation " << operation);
530
+ UNIT_ASSERT_GE_C (operationSubgroup->GetCounter (" FinishOk" , true )->Val (), 1 , TStringBuilder () << description << " , unexpected vaule for operation " << operation);
530
531
}
531
532
}
532
533
}
0 commit comments