@@ -2834,9 +2834,7 @@ R"(CREATE TABLE `test_show_create` (
28342834 }
28352835
28362836 Y_UNIT_TEST (PartitionStatsLocksFields) {
2837- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2838-
2839- TTestEnv env;
2837+ TTestEnv env ({.DataShardStatsReportIntervalSeconds = 0 });
28402838 CreateRootTable (env, /* partitionCount */ 1 , /* fillTable */ true );
28412839
28422840 TTableClient client (env.GetDriver ());
@@ -2864,11 +2862,9 @@ R"(CREATE TABLE `test_show_create` (
28642862 }
28652863
28662864 Y_UNIT_TEST (PartitionStatsFields) {
2867- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2868-
28692865 auto nowUs = TInstant::Now ().MicroSeconds ();
28702866
2871- TTestEnv env;
2867+ TTestEnv env ({. DataShardStatsReportIntervalSeconds = 0 }) ;
28722868 CreateRootTable (env);
28732869 const auto describeResult = env.GetClient ().Describe (env.GetServer ().GetRuntime (), " Root/Table0" );
28742870 const auto tablePathId = describeResult.GetPathId ();
@@ -3359,11 +3355,9 @@ R"(CREATE TABLE `test_show_create` (
33593355 }
33603356
33613357 Y_UNIT_TEST (TopPartitionsByCpuFields) {
3362- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3363-
33643358 auto nowUs = TInstant::Now ().MicroSeconds ();
33653359
3366- TTestEnv env (1 , 4 , {.EnableSVP = true });
3360+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
33673361 CreateTenantsAndTables (env);
33683362
33693363 TTableClient client (env.GetDriver ());
@@ -3411,11 +3405,9 @@ R"(CREATE TABLE `test_show_create` (
34113405 }
34123406
34133407 Y_UNIT_TEST (TopPartitionsByCpuTables) {
3414- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3415-
34163408 constexpr ui64 partitionCount = 5 ;
34173409
3418- TTestEnv env (1 , 4 , {.EnableSVP = true });
3410+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
34193411 CreateTenantsAndTables (env, true , partitionCount);
34203412
34213413 TTableClient client (env.GetDriver ());
@@ -3441,11 +3433,9 @@ R"(CREATE TABLE `test_show_create` (
34413433 }
34423434
34433435 Y_UNIT_TEST (TopPartitionsByCpuRanges) {
3444- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3445-
34463436 constexpr ui64 partitionCount = 5 ;
34473437
3448- TTestEnv env (1 , 4 , {.EnableSVP = true });
3438+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
34493439 CreateTenantsAndTables (env, true , partitionCount);
34503440
34513441 TTableClient client (env.GetDriver ());
@@ -3522,11 +3512,13 @@ R"(CREATE TABLE `test_show_create` (
35223512 }
35233513
35243514 Y_UNIT_TEST (TopPartitionsByCpuFollowers) {
3525- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3526-
35273515 auto nowUs = TInstant::Now ().MicroSeconds ();
35283516
3529- TTestEnv env (1 , 4 , {.EnableSVP = true , .EnableForceFollowers = true });
3517+ TTestEnv env (1 , 4 , {
3518+ .EnableSVP = true ,
3519+ .EnableForceFollowers = true ,
3520+ .DataShardStatsReportIntervalSeconds = 0 ,
3521+ });
35303522
35313523 auto & runtime = *env.GetServer ().GetRuntime ();
35323524 runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -3697,9 +3689,7 @@ R"(CREATE TABLE `test_show_create` (
36973689 }
36983690
36993691 Y_UNIT_TEST (TopPartitionsByTliFields) {
3700- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3701-
3702- TTestEnv env (1 , 4 , {.EnableSVP = true });
3692+ TTestEnv env (1 , 4 , {.EnableSVP = true , .DataShardStatsReportIntervalSeconds = 0 });
37033693 CreateTenantsAndTables (env);
37043694
37053695 TTableClient client (env.GetDriver ());
0 commit comments