Skip to content

Commit 49df27d

Browse files
authored
Add test create datastream with disabled autopartitioning (#8072)
1 parent 675705a commit 49df27d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ydb/services/datastreams/datastreams_ut.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,4 +2928,26 @@ Y_UNIT_TEST_SUITE(DataStreams) {
29282928

29292929
}
29302930

2931+
Y_UNIT_TEST(Test_Crreate_AutoPartitioning_Disabled) {
2932+
TInsecureDatastreamsTestServer testServer(true);
2933+
SET_YDS_LOCALS;
2934+
2935+
{
2936+
auto result = testServer.DataStreamsClient->CreateStream("test-topic",
2937+
NYDS_V1::TCreateStreamSettings()
2938+
.ShardCount(3)
2939+
.BeginConfigurePartitioningSettings()
2940+
.BeginConfigureAutoPartitioningSettings()
2941+
.Strategy(NYdb::NDataStreams::V1::EAutoPartitioningStrategy::Disabled)
2942+
.EndConfigureAutoPartitioningSettings()
2943+
.EndConfigurePartitioningSettings()
2944+
).ExtractValueSync();
2945+
UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false);
2946+
if (result.GetStatus() != EStatus::SUCCESS) {
2947+
result.GetIssues().PrintTo(Cerr);
2948+
}
2949+
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
2950+
}
2951+
}
2952+
29312953
}

0 commit comments

Comments
 (0)