Skip to content

Commit 4bf5919

Browse files
fix build
1 parent 6beff2a commit 4bf5919

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

ydb/core/tx/schemeshard/ut_export/ut_export.cpp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,8 @@ partitioning_settings {
11531153
ui64 txId = 100;
11541154

11551155
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) {
11581158
if (ev->GetTypeRewrite() == TEvDataShard::EvPeriodicTableStats) {
11591159
statsCollected.insert(ev->Get<TEvDataShard::TEvPeriodicTableStats>()->Record.GetDatashardId());
11601160
}
@@ -1246,8 +1246,8 @@ partitioning_settings {
12461246
TTestEnv env(runtime);
12471247
ui64 txId = 100;
12481248

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) {
12511251
return ev->Get()->Request.GetKey() == "/data_01.csv";
12521252
});
12531253

@@ -2724,6 +2724,7 @@ attributes {
27242724

27252725
Y_UNIT_TEST(AutoDropping) {
27262726
TTestBasicRuntime runtime;
2727+
TTestEnv env(runtime);
27272728

27282729
TPortManager portManager;
27292730
const ui16 port = portManager.GetPort();
@@ -2743,10 +2744,9 @@ attributes {
27432744
}
27442745
)", port);
27452746

2746-
Env();
2747-
Runtime().GetAppData().FeatureFlags.SetEnableExportAutoDropping(true);
2747+
runtime.GetAppData().FeatureFlags.SetEnableExportAutoDropping(true);
27482748

2749-
Run(Runtime(), Env(), TVector<TString>{
2749+
Run(runtime, env, TVector<TString>{
27502750
R"(
27512751
Name: "Table"
27522752
Columns { Name: "key" Type: "Utf8" }
@@ -2757,6 +2757,15 @@ attributes {
27572757
}
27582758

27592759
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+
27602769
auto request = Sprintf(R"(
27612770
ExportToS3Settings {
27622771
endpoint: "localhost:%d"
@@ -2766,12 +2775,11 @@ attributes {
27662775
destination_prefix: ""
27672776
}
27682777
}
2769-
)", S3Port());
2778+
)", port);
27702779

2771-
Env();
2772-
Runtime().GetAppData().FeatureFlags.SetEnableExportAutoDropping(false);
2780+
runtime.GetAppData().FeatureFlags.SetEnableExportAutoDropping(false);
27732781

2774-
Run(Runtime(), Env(), TVector<TString>{
2782+
Run(runtime, env, TVector<TString>{
27752783
R"(
27762784
Name: "Table"
27772785
Columns { Name: "key" Type: "Utf8" }

0 commit comments

Comments
 (0)