@@ -846,9 +846,7 @@ Y_UNIT_TEST_SUITE(SystemView) {
846846 }
847847
848848 Y_UNIT_TEST (PartitionStatsLocksFields) {
849- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
850-
851- TTestEnv env;
849+ TTestEnv env ({.DataShardStatsReportIntervalSeconds = 0 });
852850 CreateRootTable (env, /* partitionCount */ 1 , /* fillTable */ true );
853851
854852 TTableClient client (env.GetDriver ());
@@ -876,11 +874,9 @@ Y_UNIT_TEST_SUITE(SystemView) {
876874 }
877875
878876 Y_UNIT_TEST (PartitionStatsFields) {
879- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
880-
881877 auto nowUs = TInstant::Now ().MicroSeconds ();
882878
883- TTestEnv env;
879+ TTestEnv env ({. DataShardStatsReportIntervalSeconds = 0 }) ;
884880 CreateRootTable (env);
885881
886882 TTableClient client (env.GetDriver ());
@@ -1357,11 +1353,9 @@ Y_UNIT_TEST_SUITE(SystemView) {
13571353 }
13581354
13591355 Y_UNIT_TEST (TopPartitionsByCpuFields) {
1360- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
1361-
13621356 auto nowUs = TInstant::Now ().MicroSeconds ();
13631357
1364- TTestEnv env (1 , 4 , {.EnableSVP = true });
1358+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
13651359 CreateTenantsAndTables (env);
13661360
13671361 TTableClient client (env.GetDriver ());
@@ -1409,11 +1403,9 @@ Y_UNIT_TEST_SUITE(SystemView) {
14091403 }
14101404
14111405 Y_UNIT_TEST (TopPartitionsByCpuTables) {
1412- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
1413-
14141406 constexpr ui64 partitionCount = 5 ;
14151407
1416- TTestEnv env (1 , 4 , {.EnableSVP = true });
1408+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
14171409 CreateTenantsAndTables (env, true , partitionCount);
14181410
14191411 TTableClient client (env.GetDriver ());
@@ -1439,11 +1431,9 @@ Y_UNIT_TEST_SUITE(SystemView) {
14391431 }
14401432
14411433 Y_UNIT_TEST (TopPartitionsByCpuRanges) {
1442- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
1443-
14441434 constexpr ui64 partitionCount = 5 ;
14451435
1446- TTestEnv env (1 , 4 , {.EnableSVP = true });
1436+ TTestEnv env (1 , 4 , {.EnableSVP = true , . DataShardStatsReportIntervalSeconds = 0 });
14471437 CreateTenantsAndTables (env, true , partitionCount);
14481438
14491439 TTableClient client (env.GetDriver ());
@@ -1520,11 +1510,13 @@ Y_UNIT_TEST_SUITE(SystemView) {
15201510 }
15211511
15221512 Y_UNIT_TEST (TopPartitionsByCpuFollowers) {
1523- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
1524-
15251513 auto nowUs = TInstant::Now ().MicroSeconds ();
15261514
1527- TTestEnv env (1 , 4 , {.EnableSVP = true , .EnableForceFollowers = true });
1515+ TTestEnv env (1 , 4 , {
1516+ .EnableSVP = true ,
1517+ .EnableForceFollowers = true ,
1518+ .DataShardStatsReportIntervalSeconds = 0 ,
1519+ });
15281520
15291521 auto & runtime = *env.GetServer ().GetRuntime ();
15301522 runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -1695,9 +1687,7 @@ Y_UNIT_TEST_SUITE(SystemView) {
16951687 }
16961688
16971689 Y_UNIT_TEST (TopPartitionsByTliFields) {
1698- NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
1699-
1700- TTestEnv env (1 , 4 , {.EnableSVP = true });
1690+ TTestEnv env (1 , 4 , {.EnableSVP = true , .DataShardStatsReportIntervalSeconds = 0 });
17011691 CreateTenantsAndTables (env);
17021692
17031693 TTableClient client (env.GetDriver ());
0 commit comments