66
77namespace NKikimr ::NDataShard {
88
9+ class TDriverMock
10+ : public NTable::IDriver
11+ {
12+ public:
13+ void Touch (NTable::EScan) noexcept {
14+
15+ }
16+ };
17+
18+ class TCbExecutorActor : public TActorBootstrapped <TCbExecutorActor> {
19+ public:
20+ std::function<void ()> Cb;
21+
22+ void Bootstrap () {
23+ Cb ();
24+ }
25+ };
26+
927Y_UNIT_TEST_SUITE (IncrementalRestoreScan) {
1028 Y_UNIT_TEST (Simple) {
1129 TPortManager pm;
@@ -21,7 +39,15 @@ Y_UNIT_TEST_SUITE(IncrementalRestoreScan) {
2139 runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
2240 runtime.SetLogPriority (NKikimrServices::TX_PROXY, NLog::PRI_TRACE);
2341
24- TUserTable::TCPtr table;
42+ TUserTable::TPtr table = new TUserTable;
43+
44+ table->Columns .emplace (0 , TUserTable::TUserColumn{});
45+
46+ NTable::TScheme::TTableSchema tableSchema;
47+ tableSchema.Columns [0 ] = NTable::TColumn (" test" , 0 , {}, " " );
48+ tableSchema.Columns [0 ].KeyOrder = 0 ;
49+ auto scheme = NTable::TRowScheme::Make (tableSchema.Columns , NUtil::TSecond ());
50+
2551 TPathId targetPathId{};
2652 ui64 txId = 0 ;
2753
@@ -34,6 +60,17 @@ Y_UNIT_TEST_SUITE(IncrementalRestoreScan) {
3460 table,
3561 targetPathId,
3662 txId);
63+
64+ TDriverMock driver;
65+ auto * executor = new TCbExecutorActor;
66+ executor->Cb = [&]() {
67+ scan->Prepare (&driver, scheme);
68+ };
69+ auto executorActor = runtime.Register (executor);
70+ runtime.EnableScheduleForActor (executorActor);
71+
72+ auto resp = runtime.GrabEdgeEventRethrow <TEvIncrementalRestoreScan::TEvFinished>(sender);
73+ Y_UNUSED (resp);
3774 }
3875}
3976
0 commit comments