@@ -851,6 +851,42 @@ Y_UNIT_TEST_SUITE(TopicAutoscaling) {
851
851
auto describe = client.DescribeTopic (TEST_TOPIC).GetValueSync ();
852
852
UNIT_ASSERT_EQUAL (describe.GetTopicDescription ().GetPartitions ().size (), 3 );
853
853
854
+ bool firstPartitionFound = false ;
855
+ for (const auto & partition : describe.GetTopicDescription ().GetPartitions ()) {
856
+ if (partition.GetPartitionId () == 0 ) {
857
+ firstPartitionFound = true ;
858
+ UNIT_ASSERT (!partition.GetActive ());
859
+ UNIT_ASSERT_EQUAL (partition.GetChildPartitionIds ().size (), 2 );
860
+ auto childIds = partition.GetChildPartitionIds ();
861
+ std::sort (childIds.begin (), childIds.end ());
862
+ UNIT_ASSERT_EQUAL (childIds[0 ], 1 );
863
+ UNIT_ASSERT_EQUAL (childIds[1 ], 2 );
864
+ }
865
+ }
866
+
867
+ UNIT_ASSERT (firstPartitionFound);
868
+
869
+ TString secondPartitionTo = " " ;
870
+ TString thirdPartitionFrom = " " ;
871
+ for (const auto & partition : describe.GetTopicDescription ().GetPartitions ()) {
872
+ if (partition.GetPartitionId () == 1 || partition.GetPartitionId () == 2 ) {
873
+ UNIT_ASSERT (partition.GetActive ());
874
+ if (partition.GetPartitionId () == 1 ) {
875
+ UNIT_ASSERT (partition.GetToBound ().Defined () && !partition.GetToBound ()->Empty ());
876
+ secondPartitionTo = *partition.GetToBound ();
877
+ }
878
+ if (partition.GetPartitionId () == 2 ) {
879
+ UNIT_ASSERT (partition.GetFromBound ().Defined () && !partition.GetFromBound ()->Empty ());
880
+ thirdPartitionFrom = *partition.GetFromBound ();
881
+ }
882
+ UNIT_ASSERT_EQUAL (partition.GetParentPartitionIds ().size (), 1 );
883
+ UNIT_ASSERT_EQUAL (partition.GetParentPartitionIds ()[0 ], 0 );
884
+ }
885
+ }
886
+
887
+ UNIT_ASSERT (!secondPartitionTo.Empty ());
888
+ UNIT_ASSERT (!thirdPartitionFrom.Empty ());
889
+
854
890
auto writeSession2 = CreateWriteSession (client, " producer-1" , 1 , TEST_TOPIC, false );
855
891
UNIT_ASSERT (writeSession2->Write (Msg (msg, 3 )));
856
892
UNIT_ASSERT (writeSession2->Write (Msg (msg, 4 )));
0 commit comments