Skip to content

Commit 20f8f2c

Browse files
committed
Fix persqueue ut
1 parent e4b78b4 commit 20f8f2c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ydb/core/persqueue/fetch_request_actor.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include <ydb/library/actors/core/actor.h>
55
#include <ydb/library/aclib/aclib.h>
66

7+
#include "user_info.h"
8+
79
namespace NKikimr::NPQ {
810

911
struct TPartitionFetchRequest {
@@ -14,7 +16,7 @@ struct TPartitionFetchRequest {
1416
ui64 MaxBytes;
1517
ui64 ReadTimestampMs;
1618

17-
TPartitionFetchRequest(const TString& topic, const TString& clientId, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0)
19+
TPartitionFetchRequest(const TString& topic, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0, const TString& clientId = NKikimr::NPQ::CLIENTID_WITHOUT_CONSUMER)
1820
: Topic(topic)
1921
, ClientId(clientId)
2022
, Partition(partition)

ydb/core/persqueue/ut/fetch_request_ut.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
5858
TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000};
5959
TPartitionFetchRequest pbad{"Root/PQ/rt3.dc1--topic2", 2, 1, 10000};
6060

61-
TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000};
61+
TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000, {}};
6262
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
6363
runtime.EnableScheduleForActor(fetchId);
6464
runtime.DispatchEvents();
@@ -98,7 +98,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
9898
TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000};
9999
TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000};
100100

101-
TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000};
101+
TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000, {}};
102102
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
103103
runtime.EnableScheduleForActor(fetchId);
104104

@@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
121121
TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000};
122122
NACLib::TUserToken goodToken("user1@staff", {});
123123
NACLib::TUserToken badToken("bad-user@staff", {});
124-
TFetchRequestSettings settings{{}, {p1}, 10000, 10000, goodToken};
124+
TFetchRequestSettings settings{{}, {p1}, 10000, 10000, {}, goodToken};
125125
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
126126
runtime.EnableScheduleForActor(fetchId);
127127

0 commit comments

Comments
 (0)