@@ -800,6 +800,41 @@ Y_UNIT_TEST_SUITE(TopicAutoscaling) {
800
800
auto describe = client.DescribeTopic (TEST_TOPIC).GetValueSync ();
801
801
UNIT_ASSERT_EQUAL (describe.GetTopicDescription ().GetPartitions ().size (), 3 );
802
802
803
+ bool firstPartitionFound = false ;
804
+ for (const auto & partition : describe.GetTopicDescription ().GetPartitions ()) {
805
+ if (partition.GetPartitionId () == 0 ) {
806
+ firstPartitionFound = true ;
807
+ UNIT_ASSERT (!partition.GetActive ());
808
+ UNIT_ASSERT_EQUAL (partition.GetChildPartitionIds ().size (), 2 );
809
+ auto childIds = partition.GetChildPartitionIds ();
810
+ std::sort (childIds.begin (), childIds.end ());
811
+ UNIT_ASSERT_EQUAL (childIds[0 ], 1 );
812
+ UNIT_ASSERT_EQUAL (childIds[1 ], 2 );
813
+ }
814
+ }
815
+ UNIT_ASSERT (firstPartitionFound);
816
+
817
+ TString secondPartitionTo = " " ;
818
+ TString thirdPartitionFrom = " " ;
819
+ for (const auto & partition : describe.GetTopicDescription ().GetPartitions ()) {
820
+ if (partition.GetPartitionId () == 1 || partition.GetPartitionId () == 2 ) {
821
+ UNIT_ASSERT (partition.GetActive ());
822
+ if (partition.GetPartitionId () == 1 ) {
823
+ UNIT_ASSERT (partition.GetToBound ().Defined () && !partition.GetToBound ()->Empty ());
824
+ secondPartitionTo = *partition.GetToBound ();
825
+ }
826
+ if (partition.GetPartitionId () == 2 ) {
827
+ UNIT_ASSERT (partition.GetFromBound ().Defined () && !partition.GetFromBound ()->Empty ());
828
+ thirdPartitionFrom = *partition.GetFromBound ();
829
+ }
830
+ UNIT_ASSERT_EQUAL (partition.GetParentPartitionIds ().size (), 1 );
831
+ UNIT_ASSERT_EQUAL (partition.GetParentPartitionIds ()[0 ], 0 );
832
+ }
833
+ }
834
+
835
+ UNIT_ASSERT (!secondPartitionTo.Empty ());
836
+ UNIT_ASSERT (!thirdPartitionFrom.Empty ());
837
+
803
838
auto writeSession2 = CreateWriteSession (client, " producer-1" , 1 , TEST_TOPIC, false );
804
839
UNIT_ASSERT (writeSession2->Write (Msg (msg, 3 )));
805
840
UNIT_ASSERT (writeSession2->Write (Msg (msg, 4 )));
0 commit comments