summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniksaveliev <[email protected]>2024-01-11 19:33:05 +0600
committerGitHub <[email protected]>2024-01-11 19:33:05 +0600
commitbd18c42d5e79ec8235e5d0fc6ec3341c13212aab (patch)
tree9eef874fd425183f1b33dbebbf87601fd7eb98fc
parent3814245b29e03b4be8d7aadc2b814e8a9fb1ac00 (diff)
Fix persqueue ut (#940)
-rw-r--r--ydb/core/persqueue/fetch_request_actor.h4
-rw-r--r--ydb/core/persqueue/ut/fetch_request_ut.cpp6
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 a5f972267f5..e6adac4f9d6 100644
--- a/ydb/core/persqueue/fetch_request_actor.h
+++ b/ydb/core/persqueue/fetch_request_actor.h
@@ -4,6 +4,8 @@
#include <ydb/library/actors/core/actor.h>
#include <ydb/library/aclib/aclib.h>
+#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 b1db8200019..8e5b6c68949 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);