aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlek5andr-Kotov <152866892+Alek5andr-Kotov@users.noreply.github.com>2024-03-06 11:29:28 +0300
committerGitHub <noreply@github.com>2024-03-06 11:29:28 +0300
commitda9ce0ce7d52015496cc308aa6b26726431d95fa (patch)
tree8d744f53f3bd17f2ae159e37c0b72e65e5b54462
parentc8ffbe2351c35a80d804fc0380e223f0196d0b67 (diff)
downloadydb-da9ce0ce7d52015496cc308aa6b26726431d95fa.tar.gz
tests TPartitionWriterCacheActorTests::* (#2471)
-rw-r--r--.github/config/muted_ya.txt2
-rw-r--r--ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.cpp12
-rw-r--r--ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.h2
3 files changed, 14 insertions, 2 deletions
diff --git a/.github/config/muted_ya.txt b/.github/config/muted_ya.txt
index f5f04e4f3c2..66b14123ce1 100644
--- a/.github/config/muted_ya.txt
+++ b/.github/config/muted_ya.txt
@@ -64,8 +64,6 @@ ydb/services/persqueue_v1/ut TPersQueueTest.SetupLockSession
ydb/services/persqueue_v1/ut TPersQueueTest.TopicServiceCommitOffsetBadOffsets
ydb/services/persqueue_v1/ut TPQCompatTest.BadTopics
ydb/services/persqueue_v1/ut [3/10]*
-ydb/services/persqueue_v1/ut TPartitionWriterCacheActorTests.DropOldWriter
-ydb/services/persqueue_v1/ut TPartitionWriterCacheActorTests.WriteReplyOrder
ydb/services/persqueue_v1/ut TPersQueueTest.DisableWrongSettings
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync*
ydb/services/ydb/sdk_sessions_ut YdbSdkSessions.TestActiveSessionCountAfterBadSession
diff --git a/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.cpp b/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.cpp
index 09925460d0f..486e406fd98 100644
--- a/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.cpp
+++ b/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.cpp
@@ -109,6 +109,18 @@ void TPartitionWriterCacheActorFixture::SetupEventObserver()
++DeletePartitionWriterCount;
}
+ } else if (auto event = ev->CastAsLocal<NKqp::TEvKqp::TEvQueryRequest>(); event) {
+ if (event->GetAction() == NKikimrKqp::QUERY_ACTION_TOPIC) {
+ //
+ // If a request comes from TPartitionWriter, then we emulate the response from KQP.
+ // TPartitionWriter only needs a couple of fields
+ //
+ auto response = std::make_unique<NKqp::TEvKqp::TEvQueryResponse>();
+ response->Record.GetRef().SetYdbStatus(Ydb::StatusIds::SUCCESS);
+ response->Record.GetRef().MutableResponse()->MutableTopicOperations()->SetWriteId(NextWriteId++);
+ Ctx->Runtime->Send(ev->Sender, ev->Recipient, response.release(), 0, true);
+ return TTestActorRuntime::EEventAction::DROP;
+ }
}
return TTestActorRuntime::EEventAction::PROCESS;
diff --git a/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.h b/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.h
index cc1adc6a67b..7487a1c7ba6 100644
--- a/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.h
+++ b/ydb/services/persqueue_v1/ut/partition_writer_cache_actor_fixture.h
@@ -75,6 +75,8 @@ protected:
size_t CreatePartitionWriterCount = 0;
size_t DeletePartitionWriterCount = 0;
+
+ ui64 NextWriteId = 1;
};
}