Question about WQ2 (DescribeTopicPartition with multiple topics)

Hi, there is a test in List multiple topics challenge (in Go) which does not run always and fails when it does as it expects topics to be in some order which I don’t think is mentioned in the instructions of the challenge.

Logs :

[tester::#WQ2] Running tests for Stage #WQ2 (Listing Partitions - List for multiple topics)
[tester::#WQ2] $ ./your_program.sh /tmp/server.properties
[tester::#WQ2] Connecting to broker at: localhost:9092
[tester::#WQ2] Connection to broker at localhost:9092 successful
[tester::#WQ2] [Encoder] - DescribeTopicPartitionsRequest
[tester::#WQ2] [Encoder]   - Header
[tester::#WQ2] [Encoder]     - APIKey (75)
[tester::#WQ2] [Encoder]     - APIVersion (0)
[tester::#WQ2] [Encoder]     - CorrelationID (822386497)
[tester::#WQ2] [Encoder]     - ClientID (kafka-tester)
[tester::#WQ2] [Encoder]   - Body
[tester::#WQ2] [Encoder]     - Topics
[tester::#WQ2] [Encoder]       - Length (2)
[tester::#WQ2] [Encoder]       - Topics[0]
[tester::#WQ2] [Encoder]         - Topic
[tester::#WQ2] [Encoder]           - Name (grape)
[tester::#WQ2] [Encoder]       - Topics[1]
[tester::#WQ2] [Encoder]         - Topic
[tester::#WQ2] [Encoder]           - Name (banana)
[tester::#WQ2] [Encoder]     - ResponsePartitionLimit (3)
[tester::#WQ2] [Encoder]     - Cursor
[tester::#WQ2] [Encoder]       - IsCursorPresent (-1)
[tester::#WQ2] Sending "DescribeTopicPartitions" request
[tester::#WQ2] Hexdump of sent "DescribeTopicPartitions" request: 
[tester::#WQ2] Idx  | Hex                                             | ASCII
[tester::#WQ2] -----+-------------------------------------------------+-----------------
[tester::#WQ2] 0000 | 00 00 00 2d 00 4b 00 00 31 04 9f 41 00 0c 6b 61 | ...-.K..1..A..ka
[tester::#WQ2] 0010 | 66 6b 61 2d 74 65 73 74 65 72 00 03 06 67 72 61 | fka-tester...gra
[tester::#WQ2] 0020 | 70 65 00 07 62 61 6e 61 6e 61 00 00 00 00 03 ff | pe..banana......
[tester::#WQ2] 0030 | 00                                              | .
[tester::#WQ2] 
[tester::#WQ2] Hexdump of received "DescribeTopicPartitions" response: 
[tester::#WQ2] Idx  | Hex                                             | ASCII
[tester::#WQ2] -----+-------------------------------------------------+-----------------
[tester::#WQ2] 0000 | 00 00 00 9f 31 04 9f 41 00 00 00 00 00 03 00 00 | ....1..A........
[tester::#WQ2] 0010 | 06 67 72 61 70 65 71 a5 9a 51 89 68 4f 8b 93 7e | .grapeq..Q.hO..~
[tester::#WQ2] 0020 | 00 00 00 00 03 01 00 02 00 00 00 00 00 00 00 00 | ................
[tester::#WQ2] 0030 | 00 01 00 00 00 00 02 00 00 00 01 02 00 00 00 01 | ................
[tester::#WQ2] 0040 | 00 00 00 00 00 00 1a f5 00 00 00 07 62 61 6e 61 | ............bana
[tester::#WQ2] 0050 | 6e 61 71 a5 9a 51 89 68 4f 8b 93 7e 00 00 00 00 | naq..Q.hO..~....
[tester::#WQ2] 0060 | 04 6a 00 03 00 00 00 00 00 00 00 00 00 01 00 00 | .j..............
[tester::#WQ2] 0070 | 00 00 02 00 00 00 01 02 00 00 00 01 00 00 00 00 | ................
[tester::#WQ2] 0080 | 00 00 00 00 00 01 00 00 00 01 00 00 00 00 02 00 | ................
[tester::#WQ2] 0090 | 00 00 01 02 00 00 00 01 00 00 00 00 00 00 1a f5 | ................
[tester::#WQ2] 00a0 | 00 ff 00                                        | ...
[tester::#WQ2] 
[tester::#WQ2] [Decoder] - DescribeTopicPartitionsResponse
[tester::#WQ2] [Decoder]   - Header
[tester::#WQ2] [Decoder]     - CorrelationID (822386497)
[tester::#WQ2] [Decoder]   - Body
[tester::#WQ2] [Decoder]     - ThrottleTimeMs (0)
[tester::#WQ2] [Decoder]     - Topics
[tester::#WQ2] [Decoder]       - Length (2)
[tester::#WQ2] [Decoder]       - Topics[0]
[tester::#WQ2] [Decoder]         - ErrorCode (0)
[tester::#WQ2] [Decoder]         - Name (grape)
[tester::#WQ2] [Decoder]         - UUID (71a59a51-8968-4f8b-937e-000000000301)
[tester::#WQ2] [Decoder]         - IsInternal (False)
[tester::#WQ2] [Decoder]         - Partitions
[tester::#WQ2] [Decoder]           - Length (1)
[tester::#WQ2] [Decoder]           - Partitions[0]
[tester::#WQ2] [Decoder]             - ErrorCode (0)
[tester::#WQ2] [Decoder]             - PartitionIndex (0)
[tester::#WQ2] [Decoder]             - LeaderId (1)
[tester::#WQ2] [Decoder]             - LeaderEpoch (0)
[tester::#WQ2] [Decoder]             - ReplicaNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - ReplicaNodes[0]
[tester::#WQ2] [Decoder]                 - ReplicaNode (1)
[tester::#WQ2] [Decoder]             - IsrNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - IsrNodes[0]
[tester::#WQ2] [Decoder]                 - IsrNode (1)
[tester::#WQ2] [Decoder]             - EligibleLeaderReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - LastKnownELR
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - OfflineReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]         - TopicAuthorizedOperations (6901)
[tester::#WQ2] [Decoder]       - Topics[1]
[tester::#WQ2] [Decoder]         - ErrorCode (0)
[tester::#WQ2] [Decoder]         - Name (banana)
[tester::#WQ2] [Decoder]         - UUID (71a59a51-8968-4f8b-937e-00000000046a)
[tester::#WQ2] [Decoder]         - IsInternal (False)
[tester::#WQ2] [Decoder]         - Partitions
[tester::#WQ2] [Decoder]           - Length (2)
[tester::#WQ2] [Decoder]           - Partitions[0]
[tester::#WQ2] [Decoder]             - ErrorCode (0)
[tester::#WQ2] [Decoder]             - PartitionIndex (0)
[tester::#WQ2] [Decoder]             - LeaderId (1)
[tester::#WQ2] [Decoder]             - LeaderEpoch (0)
[tester::#WQ2] [Decoder]             - ReplicaNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - ReplicaNodes[0]
[tester::#WQ2] [Decoder]                 - ReplicaNode (1)
[tester::#WQ2] [Decoder]             - IsrNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - IsrNodes[0]
[tester::#WQ2] [Decoder]                 - IsrNode (1)
[tester::#WQ2] [Decoder]             - EligibleLeaderReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - LastKnownELR
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - OfflineReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]           - Partitions[1]
[tester::#WQ2] [Decoder]             - ErrorCode (0)
[tester::#WQ2] [Decoder]             - PartitionIndex (1)
[tester::#WQ2] [Decoder]             - LeaderId (1)
[tester::#WQ2] [Decoder]             - LeaderEpoch (0)
[tester::#WQ2] [Decoder]             - ReplicaNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - ReplicaNodes[0]
[tester::#WQ2] [Decoder]                 - ReplicaNode (1)
[tester::#WQ2] [Decoder]             - IsrNodes
[tester::#WQ2] [Decoder]               - Length (1)
[tester::#WQ2] [Decoder]               - IsrNodes[0]
[tester::#WQ2] [Decoder]                 - IsrNode (1)
[tester::#WQ2] [Decoder]             - EligibleLeaderReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - LastKnownELR
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]             - OfflineReplicas
[tester::#WQ2] [Decoder]               - Length (0 (NULL ARRAY))
[tester::#WQ2] [Decoder]         - TopicAuthorizedOperations (6901)
[tester::#WQ2] [Decoder]     - Cursor
[tester::#WQ2] [Decoder]       - IsCursorPresent (-1)
[tester::#WQ2] ✓ CorrelationID: 822386497
[tester::#WQ2] ✓ Topics array length: 2
[tester::#WQ2] ✓ Cursor.IsCursorPresent: -1
[tester::#WQ2] Expected name of Topic[0] to be banana, got grape
[tester::#WQ2] Test failed
[tester::#WQ2] Terminating program
1 Like

Hey @DragnEmperor, great catch! The official Kafka sorts topics alphabetically by name:

We’re updating the instructions to reflect this behavior in this PR.

Let us know if anything else feels off or unclear!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.