diff --git a/ydb/core/kafka_proxy/ut/ut_protocol.cpp b/ydb/core/kafka_proxy/ut/ut_protocol.cpp index fab77bff0cf8..541d19cbe13f 100644 --- a/ydb/core/kafka_proxy/ut/ut_protocol.cpp +++ b/ydb/core/kafka_proxy/ut/ut_protocol.cpp @@ -1714,21 +1714,21 @@ Y_UNIT_TEST_SUITE(KafkaProtocol) { { // Validate only - // auto msg = client.CreatePartitions({ - // TopicToCreate(topic1Name, 11), - // TopicToCreate(topic2Name, 21) - // }, true); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results.size(), 2); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results[0].Name.value(), topic1Name); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].Name.value(), topic2Name); - - // auto result0 = pqClient.DescribeTopic(topic1Name, describeTopicSettings).GetValueSync(); - // UNIT_ASSERT(result0.IsSuccess()); - // UNIT_ASSERT_EQUAL(result0.GetTopicDescription().GetPartitions().size(), 10); - - // auto result1 = pqClient.DescribeTopic(topic2Name, describeTopicSettings).GetValueSync(); - // UNIT_ASSERT(result1.IsSuccess()); - // UNIT_ASSERT_EQUAL(result1.GetTopicDescription().GetPartitions().size(), 20); + auto msg = client.CreatePartitions({ + TopicToCreate(topic1Name, 11), + TopicToCreate(topic2Name, 21) + }, true); + UNIT_ASSERT_VALUES_EQUAL(msg->Results.size(), 2); + UNIT_ASSERT_VALUES_EQUAL(msg->Results[0].Name.value(), topic1Name); + UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].Name.value(), topic2Name); + + auto result0 = pqClient.DescribeTopic(topic1Name, describeTopicSettings).GetValueSync(); + UNIT_ASSERT(result0.IsSuccess()); + UNIT_ASSERT_EQUAL(result0.GetTopicDescription().GetPartitions().size(), 10); + + auto result1 = pqClient.DescribeTopic(topic2Name, describeTopicSettings).GetValueSync(); + UNIT_ASSERT(result1.IsSuccess()); + UNIT_ASSERT_EQUAL(result1.GetTopicDescription().GetPartitions().size(), 20); } { @@ -1739,24 +1739,23 @@ Y_UNIT_TEST_SUITE(KafkaProtocol) { // Increase partitions number auto msg = client.CreatePartitions({ - TopicToCreate(shortTopic1Name, 11) - // TopicToCreate(topic2Name, 21) + TopicToCreate(shortTopic1Name, 11), + TopicToCreate(shortTopic2Name, 21) }); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results.size(), 2); - UNIT_ASSERT_VALUES_EQUAL(msg->Results.size(), 1); + UNIT_ASSERT_VALUES_EQUAL(msg->Results.size(), 2); UNIT_ASSERT_VALUES_EQUAL(msg->Results[0].Name.value(), shortTopic1Name); UNIT_ASSERT_VALUES_EQUAL(msg->Results[0].ErrorCode, NONE_ERROR); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].Name.value(), topic2Name); - // UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].ErrorCode, NONE_ERROR); + UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].Name.value(), shortTopic2Name); + UNIT_ASSERT_VALUES_EQUAL(msg->Results[1].ErrorCode, NONE_ERROR); auto result1 = pqClient.DescribeTopic(topic1Name, describeTopicSettings).GetValueSync(); UNIT_ASSERT(result1.IsSuccess()); UNIT_ASSERT_EQUAL(result1.GetTopicDescription().GetPartitions().size(), 11); - // auto result2 = pqClient.DescribeTopic(topic2Name, describeTopicSettings).GetValueSync(); - // UNIT_ASSERT(result2.IsSuccess()); - // UNIT_ASSERT_EQUAL(result2.GetTopicDescription().GetPartitions().size(), 21); + auto result2 = pqClient.DescribeTopic(topic2Name, describeTopicSettings).GetValueSync(); + UNIT_ASSERT(result2.IsSuccess()); + UNIT_ASSERT_EQUAL(result2.GetTopicDescription().GetPartitions().size(), 21); } } // Y_UNIT_TEST(CreateTopicsScenario)