I’m stuck on Stage #wa6.
I think my solution is correct, but I cannot pass the test. I’ve tested it via netcat
also.
It would be really helpful to enhance the test by showing the actual value being passed by our program and makes the test fail.
Here are my logs:
[tester::#WA6] Running tests for Stage #WA6 (Parse Correlation ID)
[tester::#WA6] $ ./your_program.sh
[tester::#WA6] Connecting to broker at: localhost:9092
[your_program] Logs from your program will appear here!
[tester::#WA6] Connection to broker at localhost:9092 successful
[tester::#WA6] Sending "ApiVersions" (version: 4) request (Correlation id: 36224004)
[tester::#WA6] Hexdump of sent "ApiVersions" request:
[tester::#WA6] Idx | Hex | ASCII
[tester::#WA6] -----+-------------------------------------------------+-----------------
[tester::#WA6] 0000 | 00 00 00 23 00 12 00 04 02 28 bc 04 00 09 6b 61 | ...#.....(....ka
[tester::#WA6] 0010 | 66 6b 61 2d 63 6c 69 00 0a 6b 61 66 6b 61 2d 63 | fka-cli..kafka-c
[tester::#WA6] 0020 | 6c 69 04 30 2e 31 00 | li.0.1.
[tester::#WA6]
[your_program] accepted new connection
[your_program] req = [0, 0, 0, 35, 0, 18, 0, 4, 2, 40, 188, 4]
[your_program] v = [0, 0, 0, 8, 2, 40, 188, 4]
[your_program] NUM = 36224004
[tester::#WA6] error reading from connection: read tcp 127.0.0.1:33922->127.0.0.1:9092: read: connection reset by peer
[tester::#WA6] Test failed
v
is a vector written to the TcpStream (my solution is in Rust). And the last 4 bytes are indeed the Correlation ID.