77#include < ydb/core/tx/tx_proxy/proxy.h>
88#include < ydb/core/tx/tx_proxy/upload_rows.h>
99#include < ydb/core/testlib/actors/block_events.h>
10+ #include < ydb/core/protos/index_builder.pb.h>
1011
1112#include < ydb/library/yql/public/issue/yql_issue_message.h>
1213
1314#include < library/cpp/testing/unittest/registar.h>
1415
1516template <>
16- inline void Out<NKikimrTxDataShard::TEvBuildIndexProgressResponse::EStatus>
17- (IOutputStream& o, NKikimrTxDataShard::TEvBuildIndexProgressResponse::EStatus status)
18- {
19- o << NKikimrTxDataShard::TEvBuildIndexProgressResponse::EStatus_Name (status);
17+ inline void Out<NKikimrIndexBuilder::EBuildStatus>(IOutputStream& o, NKikimrIndexBuilder::EBuildStatus status) {
18+ o << NKikimrIndexBuilder::EBuildStatus_Name (status);
2019}
2120
2221namespace NKikimr {
@@ -31,7 +30,7 @@ Y_UNIT_TEST_SUITE(TTxDataShardBuildIndexScan) {
3130 static void DoBuildIndex (Tests::TServer::TPtr server, TActorId sender,
3231 const TString& tableFrom, const TString& tableTo,
3332 const TRowVersion& snapshot,
34- const NKikimrTxDataShard::TEvBuildIndexProgressResponse::EStatus & expected) {
33+ const NKikimrIndexBuilder::EBuildStatus & expected) {
3534 auto &runtime = *server->GetRuntime ();
3635 TVector<ui64> datashards = GetTableShards (server, sender, tableFrom);
3736 TTableId tableId = ResolveTableId (server, sender, tableFrom);
@@ -58,14 +57,14 @@ Y_UNIT_TEST_SUITE(TTxDataShardBuildIndexScan) {
5857 TAutoPtr<IEventHandle> handle;
5958 auto reply = runtime.GrabEdgeEventRethrow <TEvDataShard::TEvBuildIndexProgressResponse>(handle);
6059
61- if (expected == NKikimrTxDataShard::TEvBuildIndexProgressResponse ::DONE
62- && reply->Record .GetStatus () == NKikimrTxDataShard::TEvBuildIndexProgressResponse ::ACCEPTED) {
60+ if (expected == NKikimrIndexBuilder::EBuildStatus ::DONE
61+ && reply->Record .GetStatus () == NKikimrIndexBuilder::EBuildStatus ::ACCEPTED) {
6362 Cerr << " skip ACCEPTED" << Endl;
6463 continue ;
6564 }
6665
67- if (expected != NKikimrTxDataShard::TEvBuildIndexProgressResponse::INPROGRESS
68- && reply->Record .GetStatus () == NKikimrTxDataShard::TEvBuildIndexProgressResponse::INPROGRESS ) {
66+ if (expected != NKikimrIndexBuilder::EBuildStatus::IN_PROGRESS
67+ && reply->Record .GetStatus () == NKikimrIndexBuilder::EBuildStatus::IN_PROGRESS ) {
6968 Cerr << " skip INPROGRESS" << Endl;
7069 continue ;
7170 }
@@ -122,7 +121,7 @@ Y_UNIT_TEST_SUITE(TTxDataShardBuildIndexScan) {
122121
123122 auto snapshot = CreateVolatileSnapshot (server, { " /Root/table-1" });
124123
125- DoBuildIndex (server, sender, " /Root/table-1" , " /Root/table-2" , snapshot, NKikimrTxDataShard::TEvBuildIndexProgressResponse ::DONE);
124+ DoBuildIndex (server, sender, " /Root/table-1" , " /Root/table-2" , snapshot, NKikimrIndexBuilder::EBuildStatus ::DONE);
126125
127126 // Writes to shadow data should not be visible yet
128127 auto data = ReadShardedTable (server, " /Root/table-2" );
@@ -174,7 +173,7 @@ Y_UNIT_TEST_SUITE(TTxDataShardBuildIndexScan) {
174173
175174 auto snapshot = CreateVolatileSnapshot (server, { " /Root/table-1" });
176175
177- DoBuildIndex (server, sender, " /Root/table-1" , " /Root/table-2" , snapshot, NKikimrTxDataShard::TEvBuildIndexProgressResponse ::DONE);
176+ DoBuildIndex (server, sender, " /Root/table-1" , " /Root/table-2" , snapshot, NKikimrIndexBuilder::EBuildStatus ::DONE);
178177
179178 // Writes to shadow data should not be visible yet
180179 auto data = ReadShardedTable (server, " /Root/table-2" );
0 commit comments