Skip to content

Instantly share code, notes, and snippets.

@iquiw
Created August 30, 2015 08:38
Show Gist options
  • Save iquiw/65ba5b3eb0de5982fd4e to your computer and use it in GitHub Desktop.
Save iquiw/65ba5b3eb0de5982fd4e to your computer and use it in GitHub Desktop.
Warp test on NetBSD
warp-3.1.3: test (suite: doctest)
Examples: 12 Tried: 12 Errors: 0 Failures: 0
warp-3.1.3: test (suite: spec)
BufferPool
withBufferPool
does not clobber buffers
Conduit
conduit
IsolatedBSSource
chunkedSource
chunk boundaries
Exception
responds even if there is an exception
user error (ioException)
ioException
FdCache
withFdCache
clean up Fd
MultiMap
fromList
generates a valid tree
toSortedList
generated a sorted list
search
acts as the list model
fromSortedList
generates a valid tree
maintains the tree with toSortedList
ReadInt
readInt64
converts ByteString to Int
Request
headerLines
takes until blank
ignored leading whitespace in bodies
throws OverLargeHeader when too many
throws OverLargeHeader when too large
known bad chunking behavior #239
random chunking
parseByteRanges
bytes=0-499
bytes=500-999
bytes=-500
bytes=9500-
foobytes=9500-
bytes=0-0,-1
headerLines
can handle a nomarl case
can handle a nasty case (1)
can handle a nasty case (1)
can handle a nasty case (1)
can handle an illegal case (1)
ResponseHeader
composeHeader
composes a HTTP header
Response
range requests
("2-3","23",Just "2-3/16")
("5-","56789abcdef",Just "5-15/16")
("5-8","5678",Just "5-8/16")
("-3","def",Just "13-15/16")
("16-","",Just "*/16")
("-17","0123456789abcdef",Nothing)
partial files
(2,2,"23")
(0,2,"01")
(3,8,"3456789a")
fileRange
gets a file size from file system
gets an error if a file does not exist
changes status if FileParts is specified
does not change status and does not add Content-Range if FileParts means the entire
gets a file size from file system and handles Range and returns Partical Content
truncates end point of range to file size
gets a file size from file system and handles Range and returns OK if Range means the entire
igores Range if FilePart is specified
Run
non-pipelining
no body, read
no body, ignore
has body, read
has body, ignore
chunked body, read FAILED [1]
chunked body, ignore
pipelining
no body, read
no body, ignore
has body, read
has body, ignore
chunked body, read
chunked body, ignore
no hanging
has body, read FAILED [2]
double connect
connection termination
IncompleteHeaders
special input
multiline headers
no space between colon and value
chunked bodies
works
lots of chunks
in chunks
timeout in request body
raw body
works
only one date and server header
streaming echo #249
streaming response with length
SendFile
packHeader
returns how much the buffer is consumed (1)
returns how much the buffer is consumed (2)
returns how much the buffer is consumed (3)
returns how much the buffer is consumed (4)
returns how much the buffer is consumed (5)
returns how much the buffer is consumed (6)
sends headers correctly (1)
sends headers correctly (2)
sends headers correctly (3)
sends headers correctly (4)
sends headers correctly (5)
sends headers correctly (6)
readSendFile
sends a file correctly (1)
sends a file correctly (2)
sends a file correctly (3)
Failures:
test/RunSpec.hs:160:
1) Run.non-pipelining chunked body, read
test/RunSpec.hs:115:
expected: 2
but got: 0
test/RunSpec.hs:188:
2) Run, no hanging, has body, read
test/RunSpec.hs:115:
expected: 1
but got: 0
Randomized with seed 1202886342
Finished in 7.8292 seconds
87 examples, 2 failures
Test suite failure for package warp-3.1.3
spec: exited with: ExitFailure 1
Logs printed to console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment