@@ -2832,9 +2832,7 @@ R"(CREATE TABLE `test_show_create` (
28322832 }
28332833
28342834 Y_UNIT_TEST (PartitionStatsLocksFields) {
2835- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2836-
2837- TTestEnv env;
2835+ TTestEnv env ({.DataShardStatsReportIntervalSeconds = 0 });
28382836 CreateRootTable (env, /* partitionCount */ 1 , /* fillTable */ true );
28392837
28402838 TTableClient client (env.GetDriver ());
@@ -2862,11 +2860,9 @@ R"(CREATE TABLE `test_show_create` (
28622860 }
28632861
28642862 Y_UNIT_TEST (PartitionStatsFields) {
2865- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2866-
28672863 auto nowUs = TInstant::Now ().MicroSeconds ();
28682864
2869- TTestEnv env;
2865+ TTestEnv env ({. DataShardStatsReportIntervalSeconds = 0 }) ;
28702866 CreateRootTable (env);
28712867 const auto describeResult = env.GetClient ().Describe (env.GetServer ().GetRuntime (), " Root/Table0" );
28722868 const auto tablePathId = describeResult.GetPathId ();
@@ -3357,11 +3353,9 @@ R"(CREATE TABLE `test_show_create` (
33573353 }
33583354
33593355 Y_UNIT_TEST (TopPartitionsByCpuFields) {
3360- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3361-
33623356 auto nowUs = TInstant::Now ().MicroSeconds ();
33633357
3364- TTestEnv env (1 , 4 , {.EnableSVP = true });
3358+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
33653359 CreateTenantsAndTables (env);
33663360
33673361 TTableClient client (env.GetDriver ());
@@ -3409,11 +3403,9 @@ R"(CREATE TABLE `test_show_create` (
34093403 }
34103404
34113405 Y_UNIT_TEST (TopPartitionsByCpuTables) {
3412- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3413-
34143406 constexpr ui64 partitionCount = 5 ;
34153407
3416- TTestEnv env (1 , 4 , {.EnableSVP = true });
3408+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
34173409 CreateTenantsAndTables (env, true , partitionCount);
34183410
34193411 TTableClient client (env.GetDriver ());
@@ -3439,11 +3431,9 @@ R"(CREATE TABLE `test_show_create` (
34393431 }
34403432
34413433 Y_UNIT_TEST (TopPartitionsByCpuRanges) {
3442- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3443-
34443434 constexpr ui64 partitionCount = 5 ;
34453435
3446- TTestEnv env (1 , 4 , {.EnableSVP = true });
3436+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
34473437 CreateTenantsAndTables (env, true , partitionCount);
34483438
34493439 TTableClient client (env.GetDriver ());
@@ -3520,11 +3510,13 @@ R"(CREATE TABLE `test_show_create` (
35203510 }
35213511
35223512 Y_UNIT_TEST (TopPartitionsByCpuFollowers) {
3523- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3524-
35253513 auto nowUs = TInstant::Now ().MicroSeconds ();
35263514
3527- TTestEnv env (1 , 4 , {.EnableSVP = true , .EnableForceFollowers = true });
3515+ TTestEnv env (1 , 4 , {
3516+ .EnableSVP = true ,
3517+ .EnableForceFollowers = true ,
3518+ .DataShardStatsReportIntervalSeconds = 0 ,
3519+ });
35283520
35293521 auto & runtime = *env.GetServer ().GetRuntime ();
35303522 runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -3695,9 +3687,7 @@ R"(CREATE TABLE `test_show_create` (
36953687 }
36963688
36973689 Y_UNIT_TEST (TopPartitionsByTliFields) {
3698- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3699-
3700- TTestEnv env (1 , 4 , {.EnableSVP = true });
3690+ TTestEnv env (1 , 4 , {.EnableSVP = true , .DataShardStatsReportIntervalSeconds = 0 });
37013691 CreateTenantsAndTables (env);
37023692
37033693 TTableClient client (env.GetDriver ());
0 commit comments