@@ -1153,8 +1153,8 @@ partitioning_settings {
1153
1153
ui64 txId = 100 ;
1154
1154
1155
1155
THashSet<ui64> statsCollected;
1156
- Runtime () .GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
1157
- Runtime () .SetObserverFunc ([&](TAutoPtr<IEventHandle>& ev) {
1156
+ runtime .GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
1157
+ runtime .SetObserverFunc ([&](TAutoPtr<IEventHandle>& ev) {
1158
1158
if (ev->GetTypeRewrite () == TEvDataShard::EvPeriodicTableStats) {
1159
1159
statsCollected.insert (ev->Get <TEvDataShard::TEvPeriodicTableStats>()->Record .GetDatashardId ());
1160
1160
}
@@ -1246,8 +1246,8 @@ partitioning_settings {
1246
1246
TTestEnv env (runtime);
1247
1247
ui64 txId = 100 ;
1248
1248
1249
- Runtime () .GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
1250
- TBlockEvents<NKikimr::NWrappers::NExternalStorage::TEvPutObjectRequest> blockPartition01 (Runtime () , [](auto && ev) {
1249
+ runtime .GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
1250
+ TBlockEvents<NKikimr::NWrappers::NExternalStorage::TEvPutObjectRequest> blockPartition01 (runtime , [](auto && ev) {
1251
1251
return ev->Get ()->Request .GetKey () == " /data_01.csv" ;
1252
1252
});
1253
1253
@@ -2724,6 +2724,7 @@ attributes {
2724
2724
2725
2725
Y_UNIT_TEST (AutoDropping) {
2726
2726
TTestBasicRuntime runtime;
2727
+ TTestEnv env (runtime);
2727
2728
2728
2729
TPortManager portManager;
2729
2730
const ui16 port = portManager.GetPort ();
@@ -2743,10 +2744,9 @@ attributes {
2743
2744
}
2744
2745
)" , port);
2745
2746
2746
- Env ();
2747
- Runtime ().GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
2747
+ runtime.GetAppData ().FeatureFlags .SetEnableExportAutoDropping (true );
2748
2748
2749
- Run (Runtime (), Env () , TVector<TString>{
2749
+ Run (runtime, env , TVector<TString>{
2750
2750
R"(
2751
2751
Name: "Table"
2752
2752
Columns { Name: "key" Type: "Utf8" }
@@ -2757,6 +2757,15 @@ attributes {
2757
2757
}
2758
2758
2759
2759
Y_UNIT_TEST (DisableAutoDropping) {
2760
+ TTestBasicRuntime runtime;
2761
+ TTestEnv env (runtime);
2762
+
2763
+ TPortManager portManager;
2764
+ const ui16 port = portManager.GetPort ();
2765
+
2766
+ TS3Mock s3Mock ({}, TS3Mock::TSettings (port));
2767
+ UNIT_ASSERT (s3Mock.Start ());
2768
+
2760
2769
auto request = Sprintf (R"(
2761
2770
ExportToS3Settings {
2762
2771
endpoint: "localhost:%d"
@@ -2766,12 +2775,11 @@ attributes {
2766
2775
destination_prefix: ""
2767
2776
}
2768
2777
}
2769
- )" , S3Port () );
2778
+ )" , port );
2770
2779
2771
- Env ();
2772
- Runtime ().GetAppData ().FeatureFlags .SetEnableExportAutoDropping (false );
2780
+ runtime.GetAppData ().FeatureFlags .SetEnableExportAutoDropping (false );
2773
2781
2774
- Run (Runtime (), Env () , TVector<TString>{
2782
+ Run (runtime, env , TVector<TString>{
2775
2783
R"(
2776
2784
Name: "Table"
2777
2785
Columns { Name: "key" Type: "Utf8" }
0 commit comments