I’m stuck on Stage #wa6. This runs locally when I run the following command
echo -n "00000023001200046f7fc66100096b61666b612d636c69000a6b61666b612d636c6904302e3100" | xxd -r -p | nc localhost 9092 | hexdump -C
But when the test is run on the server I get this error:
compile] Compilation successful.
Debug = true
[tester::#WA6] Running tests for Stage #WA6 (Parse Correlation ID)
[tester::#WA6] $ ./your_program.sh /tmp/server.properties
[tester::#WA6] Connecting to broker at: localhost:9092
[your_program] Logs from your program will appear here!
[your_program] accepted new connection
[tester::#WA6] Connection to broker at localhost:9092 successful
[tester::#WA6] Sending "ApiVersions" (version: 4) request (Correlation id: 179618540)
[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 0a b4 c2 ec 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]
[tester::#WA6] error reading from connection: read tcp 127.0.0.1:37066->127.0.0.1:9092: read: connection reset by peer
[tester::#WA6] Test failed
[tester::#WA6] Terminating program
[tester::#WA6] Program terminated successfully
Here are my logs:
00000000 00 00 00 00 6f 7f c6 61 |....o..a|
00000008
And here’s a snippet of my code:
Rust Gist
The tests pass when I read everything from the stream, but I haven’t understood the reason of failure here?