I’m stuck on Stage Send Correlation ID #nv3
I’ve tried the other solution provided adding a new line, but that did not work either.
Here are my logs:
remote: [tester::#NV3] Running tests for Stage #NV3 (Send Correlation ID)
remote: [tester::#NV3] $ ./your_program.sh /tmp/server.properties
remote: [tester::#NV3] [Serializer] Writing log files to: /tmp/kraft-combined-logs
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/server.properties
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/meta.properties
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/.kafka_cleanshutdown
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/bar-0/partition.metadata
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/paz-0/partition.metadata
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/qux-0/partition.metadata
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/qux-1/partition.metadata
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/__cluster_metadata-0/partition.metadata
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/bar-0/00000000000000000000.log
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/paz-0/00000000000000000000.log
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/qux-0/00000000000000000000.log
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/qux-1/00000000000000000000.log
remote: [tester::#NV3] [Serializer] - Wrote file to: /tmp/kraft-combined-logs/__cluster_metadata-0/00000000000000000000.log
remote: [tester::#NV3] [Serializer] Finished writing log files to: /tmp/kraft-combined-logs
remote: [tester::#NV3] Connecting to broker at: localhost:9092
remote: [tester::#NV3] Looks like your program has terminated. A Kafka server is expected to be a long-running process.
remote: [tester::#NV3] Test failed
remote: [tester::#NV3] Terminating program
remote: [tester::#NV3] Program terminated successfully
And here’s a snippet of my code:
import socket # noqa: F401
def main():
print("test printing")
def create_message(idw):
id_bytes = idw.to_bytes(4, byteorder="big")
return len(id_bytes).to_bytes(4, byteorder="big") + id_bytes
def handle_client(client):
client.recv(1024)
client.sendall(create_message(9))
client.close()
server = socket.create_server(("localhost", 9092), reuse_port=True)
while True:
client, addr = server.accept()
handle_client(client)