From 20f8f2cd19d6bdb57f6795a63be86768ddf28dc6 Mon Sep 17 00:00:00 2001 From: Nikita Saveliev Date: Thu, 11 Jan 2024 11:51:54 +0000 Subject: [PATCH] Fix persqueue ut --- ydb/core/persqueue/fetch_request_actor.h | 4 +++- ydb/core/persqueue/ut/fetch_request_ut.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ydb/core/persqueue/fetch_request_actor.h b/ydb/core/persqueue/fetch_request_actor.h index a5f972267f57..e6adac4f9d62 100644 --- a/ydb/core/persqueue/fetch_request_actor.h +++ b/ydb/core/persqueue/fetch_request_actor.h @@ -4,6 +4,8 @@ #include #include +#include "user_info.h" + namespace NKikimr::NPQ { struct TPartitionFetchRequest { @@ -14,7 +16,7 @@ struct TPartitionFetchRequest { ui64 MaxBytes; ui64 ReadTimestampMs; - TPartitionFetchRequest(const TString& topic, const TString& clientId, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0) + TPartitionFetchRequest(const TString& topic, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0, const TString& clientId = NKikimr::NPQ::CLIENTID_WITHOUT_CONSUMER) : Topic(topic) , ClientId(clientId) , Partition(partition) diff --git a/ydb/core/persqueue/ut/fetch_request_ut.cpp b/ydb/core/persqueue/ut/fetch_request_ut.cpp index b1db8200019c..8e5b6c68949a 100644 --- a/ydb/core/persqueue/ut/fetch_request_ut.cpp +++ b/ydb/core/persqueue/ut/fetch_request_ut.cpp @@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) { TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000}; TPartitionFetchRequest pbad{"Root/PQ/rt3.dc1--topic2", 2, 1, 10000}; - TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000}; + TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000, {}}; auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId)); runtime.EnableScheduleForActor(fetchId); runtime.DispatchEvents(); @@ -98,7 +98,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) { TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000}; TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000}; - TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000}; + TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000, {}}; auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId)); runtime.EnableScheduleForActor(fetchId); @@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) { TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000}; NACLib::TUserToken goodToken("user1@staff", {}); NACLib::TUserToken badToken("bad-user@staff", {}); - TFetchRequestSettings settings{{}, {p1}, 10000, 10000, goodToken}; + TFetchRequestSettings settings{{}, {p1}, 10000, 10000, {}, goodToken}; auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId)); runtime.EnableScheduleForActor(fetchId);