HttpConnectionHandlerTest
Tests
| Test |
Method name |
Duration |
Result |
| 초기 버퍼에 이미 완전한 요청이 들어있어도 처리된다 |
initialBuffer_alreadyContainsFullRequest() |
0.005s |
passed |
| READ: 완전한 요청이면 PROCESSING → executor 작업 → WRITING 전환 & OP_WRITE 등록 |
read_completeRequest_submitsTask_and_switchesToWriting() |
0.123s |
passed |
| READ: -1 이면 연결 종료 |
read_remoteClosed_closesChannel() |
0.003s |
passed |
| WRITE: 전체 전송 완료 시 READ 상태로 전환하고 버퍼 초기화 |
write_flushAll_then_readyForNextRequest() |
0.004s |
passed |
| WRITE: 부분 전송이면 남은 데이터, close하지 않음 |
write_partial_doesNotClose() |
0.003s |
passed |
Standard output
Try to read from null with current state: READING and buffer size: 8192 bytes
Read from null with current state: READING and buffer size: 8192 bytes
Request is Completed!
--- Parsing Request ---
GET / HTTP/1.1
Host: localhost
--- End of Request ---
Try to read from null with current state: READING and buffer size: 8166 bytes
Read from null with current state: READING and buffer size: 8166 bytes
Request is Completed!
--- Parsing Request ---
GET / HTTP/1.1
Host:a
--- End of Request ---
Try to read from null with current state: READING and buffer size: 8192 bytes
Read from null with current state: READING and buffer size: 8192 bytes
Bytes read is -1. Closing connection...