Open tomask80 opened 7 months ago
Máte pravdu.
Hm.
Skúsim tie testy upraviť, ale až zajtra.
-- GJ
Dňa ut 23. 4. 2024 o 23:14 Tomas Kassovic @.***> napísala(a):
Podla zadania
4.4.6 Neznáma metóda Ak klient pošle na začiatku požiadavky čokoľvek iné, ako je riadok obsahujúci známu metódu, server vráti status 203 Unknown method s prázdnymi hlavičkami a obsahom a uzavrie spojenie.
server by mal zatvarat spojenie - test01 by teda mal testovat toto zavretie avsak ak server zavrie spojenie tak
- klient si neotvori nove spojenie
- zacne posielat dalsi request ale na uz zavrety socket
- test spadne na chybe broken pipe
- test sa nedokonci a je oznaceny ako vadny
test_YAMLServer.txt
Filename:req_respA.yaml
C->S: b'BADMETHOD\n' C->S: b'Key:xxx\n' C->S: b'Field:a\n' C->S: b'\n'
End request, awaiting response S->C: b'203 Unknown method\n' S->C: b'' S->C: Server closed connection
Got expected response, OK
Filename:req_respB.yaml
C->S: b'BADMETHOD\n' Killing server process with rkill 5963 5966 Killed server PID 5963 Checking with ps: PID TTY TIME CMD Test exit status: 1 Running test_cleanup.sh Exitting test.sh
test_YAMLServer.err
Traceback (most recent call last): File "/home/tomas/projects/test_yaml_server/test01/test.py", line 246, in
request.send(f) File "/home/tomas/projects/test_yaml_server/test01/test.py", line 73, in send write_tee(f,f'{self.method}\n'.encode('utf-8')) File "/home/tomas/projects/test_yaml_server/test01/test.py", line 54, in write_tee f.flush() File "/usr/lib/python3.10/socket.py", line 723, in write return self._sock.send(b) BrokenPipeError: [Errno 32] Broken pipe — Reply to this email directly, view it on GitHub https://github.com/gjenca/test_yaml_server/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIT4H7MWBY4J4QQJ6MOQS3Y63FMBAVCNFSM6AAAAABGVV7JB6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TSNZXG42DQOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Tak nie, rozmyslel som si to.
Je to moja chyba, takže ju vyriešim spôsobom najmenej otravným pre študentov: zmením zadanie tak, aby sa spojenie nezatváralo. Všetci okrem Vás to tak naimplementovali (aj ja). Ono to tam vlastne zostalo zo zadania pred 2 rokmi, omylom.
-- GJ
ut 23. 4. 2024 o 23:14 Tomas Kassovic @.***> napísal(a):
Podla zadania
4.4.6 Neznáma metóda Ak klient pošle na začiatku požiadavky čokoľvek iné, ako je riadok obsahujúci známu metódu, server vráti status 203 Unknown method s prázdnymi hlavičkami a obsahom a uzavrie spojenie.
server by mal zatvarat spojenie - test01 by teda mal testovat toto zavretie avsak ak server zavrie spojenie tak
- klient si neotvori nove spojenie
- zacne posielat dalsi request ale na uz zavrety socket
- test spadne na chybe broken pipe
- test sa nedokonci a je oznaceny ako vadny
test_YAMLServer.txt
Filename:req_respA.yaml
C->S: b'BADMETHOD\n' C->S: b'Key:xxx\n' C->S: b'Field:a\n' C->S: b'\n'
End request, awaiting response S->C: b'203 Unknown method\n' S->C: b'' S->C: Server closed connection
Got expected response, OK
Filename:req_respB.yaml
C->S: b'BADMETHOD\n' Killing server process with rkill 5963 5966 Killed server PID 5963 Checking with ps: PID TTY TIME CMD Test exit status: 1 Running test_cleanup.sh Exitting test.sh
test_YAMLServer.err
Traceback (most recent call last): File "/home/tomas/projects/test_yaml_server/test01/test.py", line 246, in
request.send(f) File "/home/tomas/projects/test_yaml_server/test01/test.py", line 73, in send write_tee(f,f'{self.method}\n'.encode('utf-8')) File "/home/tomas/projects/test_yaml_server/test01/test.py", line 54, in write_tee f.flush() File "/usr/lib/python3.10/socket.py", line 723, in write return self._sock.send(b) BrokenPipeError: [Errno 32] Broken pipe — Reply to this email directly, view it on GitHub https://github.com/gjenca/test_yaml_server/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIT4H7MWBY4J4QQJ6MOQS3Y63FMBAVCNFSM6AAAAABGVV7JB6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TSNZXG42DQOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Podla zadania
server by mal zatvarat spojenie - test01 by teda mal testovat toto zavretie avsak ak server zavrie spojenie tak
test_YAMLServer.txt
test_YAMLServer.err