diff --git a/ydb/core/kqp/session_actor/kqp_session_actor.cpp b/ydb/core/kqp/session_actor/kqp_session_actor.cpp index 71600ee6db41..7fb20124e070 100644 --- a/ydb/core/kqp/session_actor/kqp_session_actor.cpp +++ b/ydb/core/kqp/session_actor/kqp_session_actor.cpp @@ -2389,6 +2389,10 @@ class TKqpSessionActor : public TActorBootstrapped { PassAway(); } + void HandleFinalCleanup(TEvKqp::TEvQueryRequest::TPtr& ev) { + ReplyProcessError(ev, Ydb::StatusIds::BAD_SESSION, "Session is under shutdown"); + } + STFUNC(ReadyState) { try { switch (ev->GetTypeRewrite()) { @@ -2523,6 +2527,7 @@ class TKqpSessionActor : public TActorBootstrapped { hFunc(TEvents::TEvUndelivered, HandleNoop); hFunc(TEvKqpSnapshot::TEvCreateSnapshotResponse, Handle); hFunc(NWorkload::TEvContinueRequest, HandleNoop); + hFunc(TEvKqp::TEvQueryRequest, HandleFinalCleanup); } } catch (const yexception& ex) { InternalError(ex.what()); diff --git a/ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp b/ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp index c0828e35e136..1c4a04737e0e 100644 --- a/ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp +++ b/ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp @@ -545,15 +545,15 @@ Y_UNIT_TEST_F(Offsets_Cannot_Be_Promoted_When_Reading_In_A_Transaction, TFixture UNIT_ASSERT_EXCEPTION(ReadMessage(reader, {.Tx = tx, .CommitOffsets = true}), yexception); } -//Y_UNIT_TEST_F(WriteToTopic_Invalid_Session, TFixture) -//{ -// WriteToTopicWithInvalidTxId(false); -//} -// -//Y_UNIT_TEST_F(WriteToTopic_Invalid_Tx, TFixture) -//{ -// WriteToTopicWithInvalidTxId(true); -//} +Y_UNIT_TEST_F(WriteToTopic_Invalid_Session, TFixture) +{ + WriteToTopicWithInvalidTxId(false); +} + +Y_UNIT_TEST_F(WriteToTopic_Invalid_Tx, TFixture) +{ + WriteToTopicWithInvalidTxId(true); +} Y_UNIT_TEST_F(WriteToTopic_Two_WriteSession, TFixture) {