slbotbm commented on code in PR #3927:
URL: https://github.com/apache/iggy/pull/3927#discussion_r3839551994


##########
foreign/python/tests/test_message_operations.py:
##########
@@ -109,6 +150,87 @@ async def 
test_send_messages_reports_committed_confirmation(
         assert confirmation.partition_id == partition_id
         assert confirmation.base_offset == polled_messages[0].offset()
 
+    @pytest.mark.asyncio
+    async def test_send_messages_with_partition_id_strategy(
+        self, iggy_client: IggyClient, unique_name
+    ):
+        stream_name = unique_name()
+        topic_name = unique_name()
+        partition_id = 2
+
+        await iggy_client.create_stream(stream_name)
+        await iggy_client.create_topic(
+            stream=stream_name, name=topic_name, partitions_count=3
+        )
+
+        response = await iggy_client.send_messages(
+            stream=stream_name,
+            topic=topic_name,
+            partitioning=Partitioning.partition_id(partition_id),
+            messages=[Message("fixed partition")],
+        )
+
+        assert len(response.confirmations) == 1
+        assert response.confirmations[0].partition_id == partition_id
+
+    @pytest.mark.asyncio
+    async def test_send_messages_with_balanced_strategy(

Review Comment:
   Let's change it like this: replace this test's single send with four sends 
using `Partitioning.balanced()`, collect the confirmation partition IDs, and 
assert `[0, 1, 2, 0]`. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to