@@ -2704,9 +2704,7 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
27042704 }
27052705
27062706 Y_UNIT_TEST (PartitionStatsLocksFields) {
2707- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2708-
2709- TTestEnv env;
2707+ TTestEnv env ({.DataShardStatsReportIntervalSeconds = 0 });
27102708 CreateRootTable (env, /* partitionCount */ 1 , /* fillTable */ true );
27112709
27122710 TTableClient client (env.GetDriver ());
@@ -2734,11 +2732,9 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
27342732 }
27352733
27362734 Y_UNIT_TEST (PartitionStatsFields) {
2737- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
2738-
27392735 auto nowUs = TInstant::Now ().MicroSeconds ();
27402736
2741- TTestEnv env;
2737+ TTestEnv env ({. DataShardStatsReportIntervalSeconds = 0 }) ;
27422738 CreateRootTable (env);
27432739 const auto describeResult = env.GetClient ().Describe (env.GetServer ().GetRuntime (), " Root/Table0" );
27442740 const auto tablePathId = describeResult.GetPathId ();
@@ -3229,11 +3225,9 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
32293225 }
32303226
32313227 Y_UNIT_TEST (TopPartitionsByCpuFields) {
3232- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3233-
32343228 auto nowUs = TInstant::Now ().MicroSeconds ();
32353229
3236- TTestEnv env (1 , 4 , {.EnableSVP = true });
3230+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
32373231 CreateTenantsAndTables (env);
32383232
32393233 TTableClient client (env.GetDriver ());
@@ -3281,11 +3275,9 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
32813275 }
32823276
32833277 Y_UNIT_TEST (TopPartitionsByCpuTables) {
3284- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3285-
32863278 constexpr ui64 partitionCount = 5 ;
32873279
3288- TTestEnv env (1 , 4 , {.EnableSVP = true });
3280+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
32893281 CreateTenantsAndTables (env, true , partitionCount);
32903282
32913283 TTableClient client (env.GetDriver ());
@@ -3311,11 +3303,9 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
33113303 }
33123304
33133305 Y_UNIT_TEST (TopPartitionsByCpuRanges) {
3314- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3315-
33163306 constexpr ui64 partitionCount = 5 ;
33173307
3318- TTestEnv env (1 , 4 , {.EnableSVP = true });
3308+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
33193309 CreateTenantsAndTables (env, true , partitionCount);
33203310
33213311 TTableClient client (env.GetDriver ());
@@ -3392,11 +3382,13 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
33923382 }
33933383
33943384 Y_UNIT_TEST (TopPartitionsByCpuFollowers) {
3395- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3396-
33973385 auto nowUs = TInstant::Now ().MicroSeconds ();
33983386
3399- TTestEnv env (1 , 4 , {.EnableSVP = true , .EnableForceFollowers = true });
3387+ TTestEnv env (1 , 4 , {
3388+ .EnableSVP = true ,
3389+ .EnableForceFollowers = true ,
3390+ .DataShardStatsReportIntervalSeconds = 0 ,
3391+ });
34003392
34013393 auto & runtime = *env.GetServer ().GetRuntime ();
34023394 runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -3567,9 +3559,7 @@ ALTER OBJECT `/Root/test_show_create` (TYPE TABLE) SET (ACTION = UPSERT_OPTIONS,
35673559 }
35683560
35693561 Y_UNIT_TEST (TopPartitionsByTliFields) {
3570- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
3571-
3572- TTestEnv env (1 , 4 , {.EnableSVP = true });
3562+ TTestEnv env (1 , 4 , {.EnableSVP = true , .DataShardStatsReportIntervalSeconds = 0 });
35733563 CreateTenantsAndTables (env);
35743564
35753565 TTableClient client (env.GetDriver ());
0 commit comments