@@ -2020,11 +2020,14 @@ Y_UNIT_TEST(TestPlannedTimeoutSplit) {
2020
2020
}
2021
2021
}
2022
2022
2023
- Y_UNIT_TEST (TestPlannedHalfOverloadedSplit) {
2023
+ Y_UNIT_TEST_TWIN (TestPlannedHalfOverloadedSplit, UseSink ) {
2024
2024
TPortManager pm;
2025
2025
TServerSettings serverSettings(pm.GetPort(2134));
2026
+ NKikimrConfig::TAppConfig app;
2027
+ app.MutableTableServiceConfig()->SetEnableOltpSink(UseSink);
2026
2028
serverSettings.SetDomainName("Root")
2027
- .SetUseRealThreads(false);
2029
+ .SetUseRealThreads(false)
2030
+ .SetAppConfig(app);
2028
2031
2029
2032
Tests::TServer::TPtr server = new TServer(serverSettings);
2030
2033
auto &runtime = *server->GetRuntime();
@@ -2055,7 +2058,8 @@ Y_UNIT_TEST(TestPlannedHalfOverloadedSplit) {
2055
2058
TVector<THolder<IEventHandle>> txProposeResults;
2056
2059
auto captureMessages = [&](TAutoPtr<IEventHandle> &event) -> auto {
2057
2060
switch (event->GetTypeRewrite()) {
2058
- case TEvDataShard::EvProposeTransaction: {
2061
+ case TEvDataShard::EvProposeTransaction:
2062
+ case NKikimr::NEvents::TDataEvents::EvWrite: {
2059
2063
Cerr << "---- observed EvProposeTransactionResult ----" << Endl;
2060
2064
if (txProposes.size() == 0) {
2061
2065
// Capture the first propose
@@ -2064,7 +2068,8 @@ Y_UNIT_TEST(TestPlannedHalfOverloadedSplit) {
2064
2068
}
2065
2069
break;
2066
2070
}
2067
- case TEvDataShard::EvProposeTransactionResult: {
2071
+ case TEvDataShard::EvProposeTransactionResult:
2072
+ case NKikimr::NEvents::TDataEvents::EvWriteResult: {
2068
2073
Cerr << "---- observed EvProposeTransactionResult ----" << Endl;
2069
2074
if (txProposes.size() > 0) {
2070
2075
// Capture all propose results
@@ -2452,11 +2457,14 @@ Y_UNIT_TEST(TestReadTableSingleShardImmediate) {
2452
2457
UNIT_ASSERT_VALUES_EQUAL(seenPlanSteps, 0u);
2453
2458
}
2454
2459
2455
- Y_UNIT_TEST (TestImmediateQueueThenSplit) {
2460
+ Y_UNIT_TEST_TWIN (TestImmediateQueueThenSplit, UseSink ) {
2456
2461
TPortManager pm;
2457
2462
TServerSettings serverSettings(pm.GetPort(2134));
2463
+ NKikimrConfig::TAppConfig app;
2464
+ app.MutableTableServiceConfig()->SetEnableOltpSink(UseSink);
2458
2465
serverSettings.SetDomainName("Root")
2459
- .SetUseRealThreads(false);
2466
+ .SetUseRealThreads(false)
2467
+ .SetAppConfig(app);
2460
2468
2461
2469
Tests::TServer::TPtr server = new TServer(serverSettings);
2462
2470
auto &runtime = *server->GetRuntime();
@@ -2499,6 +2507,7 @@ Y_UNIT_TEST(TestImmediateQueueThenSplit) {
2499
2507
}
2500
2508
break;
2501
2509
case TEvDataShard::EvProposeTransaction:
2510
+ case NKikimr::NEvents::TDataEvents::EvWrite:
2502
2511
if (capturePropose) {
2503
2512
Cerr << "---- capture EvProposeTransaction ----" << Endl;
2504
2513
eventsPropose.emplace_back(event.Release());
@@ -2620,10 +2629,11 @@ Y_UNIT_TEST(TestImmediateQueueThenSplit) {
2620
2629
<< failures << " failures");
2621
2630
}
2622
2631
2623
- void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query) {
2632
+ void TestLateKqpQueryAfterColumnDrop(bool dataQuery, bool useSink, const TString& query) {
2624
2633
TPortManager pm;
2625
2634
NKikimrConfig::TAppConfig app;
2626
2635
app.MutableTableServiceConfig()->SetEnableKqpScanQuerySourceRead(false);
2636
+ app.MutableTableServiceConfig()->SetEnableOltpSink(useSink);
2627
2637
TServerSettings serverSettings(pm.GetPort(2134));
2628
2638
serverSettings.SetDomainName("Root")
2629
2639
.SetUseRealThreads(false)
@@ -2671,6 +2681,15 @@ void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query) {
2671
2681
break;
2672
2682
}
2673
2683
2684
+ case NKikimr::NEvents::TDataEvents::EvWrite: {
2685
+ if (capturePropose) {
2686
+ Cerr << "---- capture EvWrite ----" << Endl;
2687
+ eventsPropose.emplace_back(ev.Release());
2688
+ return TTestActorRuntime::EEventAction::DROP;
2689
+ }
2690
+ break;
2691
+ }
2692
+
2674
2693
case TEvDataShard::EvKqpScan: {
2675
2694
if (capturePropose) {
2676
2695
Cerr << "---- capture EvKqpScan ----" << Endl;
@@ -2735,8 +2754,8 @@ void TestLateKqpQueryAfterColumnDrop(bool dataQuery, const TString& query) {
2735
2754
}
2736
2755
}
2737
2756
2738
- Y_UNIT_TEST (TestLateKqpScanAfterColumnDrop) {
2739
- TestLateKqpQueryAfterColumnDrop(false, "SELECT SUM(value2) FROM `/Root/table-1`");
2757
+ Y_UNIT_TEST_TWIN (TestLateKqpScanAfterColumnDrop, UseSink ) {
2758
+ TestLateKqpQueryAfterColumnDrop(false, UseSink, "SELECT SUM(value2) FROM `/Root/table-1`");
2740
2759
}
2741
2760
2742
2761
Y_UNIT_TEST(TestSecondaryClearanceAfterShardRestartRace) {
0 commit comments