Date | Commit message (Collapse) |
|
Also new are added basic HTTP tests for UNIX domain socket
handling (for all models, now, of course).
|
|
|
|
Using a "+" suffix alone was not enough protection since we use
evil recursive makes and can't share dependency info with parent
makes. While this could be done more efficiently (even with
recursive make), but it'd be harder to maintain. So we generate
the dependencies later to and sacrifice efficiency on the
initial run (but rarely/never again).
|
|
This makes it easier to figure out why tests are failing
for people that forget to read t/README
|
|
|
|
Even though our tests do an extra check, it's faster to
not unnecessarily invoke the check in the first place.
|
|
This is should be compatible with how the Thin webserver
provides async callback support.
See http://github.com/raggi/async_sinatra for the details
|
|
Use a bigger random_blob and run GC before checking RSS
|
|
This means Rainbows::DevFdBody async responses and large
file streaming without slurping.
This is only with eventmachine 0.12.8, it looks like 0.12.10
changes the attach/watch API...
|
|
log reopens, graceful shutdown, HTTP error responses
should all be working now.
|
|
This makes it easier to filter functionality by model.
|
|
We'll probably make AppPool at least not break down and die in
the future, but for now just disable it if run directly.
|
|
This will make it easier to enable and manage tests for new
concurrency models.
|
|
Everything passes, and "set -e" prevents us from
making any stupid mistakes...
|
|
This will eventually allow our test output to be consumed by any
TAP[1]-compatible consumers. Like the rest of our shell scripts,
this only relies on POSIX behavior and has no bashisms.
mktemp(1) is a requirement only if using the verbose output in
this library.
This library aims to be useful outside of Rainbows!
[1]: Test Anything Protocol: http://testanything.org/
|
|
Instead of sleeping and waiting for a PID file to appear,
just use a named-pipe and block on it in the test scripts
since we know Unicorn won't attempt to fork until sockets
are already bound.
|
|
It's more common form for externally-visible/modifiable
variables in Makefiles and shell scripts.
|
|
Ensure our workers are capable of processing requests before we
can continue to setup signal handlers. The later "kill -USR1"
signal may fire in our test script before the workers have a
chance to setup the handlers. So by the time we receive a
positive response, we _know_ signal handlers are ready.
|
|
utee is line-oriented on _read_, so avoid messing with
that for this. Additionally, spawn our FIFO cats before
we start writing gobs of data out since it could cause
the writers to block otherwise.
|
|
The cmp test was completely unnecessary and
pointless.
|
|
Since HTTP/0.9 responses have no headers to write, the
on_write_complete handler we rely on never got triggered,
leading to additional reads to never get queued up.
Additionally, we need to explicitly detect and close client
sockets if we've written the last response body since HTTP/0.9
clients never know when it's time to close a connection.
|
|
Don't try to clobber FIFOs at startup since sometimes traps may
not fire. And while we're at it, avoid trying to unlink them
twice.
|
|
The extra CRLF is not needed for HTTP/0.9
|
|
Instead of using completely random names, we'll use
predictable ones since we already depend on them for
exit codes and such. This drops our ability to run
the same test for the same version of Ruby in the
same working tree, but that's an unlikely scenario.
While we're at it, avoid remove tempfiles if a test
failed. This should make debugging easier.
|
|
If we're going to name a variable "fifo", it'll be for
descriptive reasons...
|
|
We now check for SIGKILL, too
|
|
This new middleware should be a no-op for non-Rev concurrency
models (or by explicitly setting env['rainbows.autochunk'] to
false).
Setting env['rainbows.autochunk'] to true (the default when Rev
is used) allows (e)poll-able IO objects (sockets, pipes) to be
sent asynchronously after app.call(env) returns.
This also has a fortunate side effect of introducing a code path
which allows large, static files to be sent without slurping
them into a Rev IO::Buffer, too. This new change works even
without the DevFdResponse middleware, so you won't have to
reconfigure your app.
This lets us epoll on response bodies that come in from a pipe
or even a socket and send them either straight through or with
chunked encoding.
|
|
|
|
|
|
We support pipelining, keepalive, and even HTTP/0.9!
|
|
|
|
We'll spit out a proper warning later anyways...
|
|
|
|
|
|
|
|
|
|
At least these tests all run with dash now, but ksh93
or bash is still recommended for pipefail
|
|
Just in case we break something. Also add staggered
blob test to simulate slow client uploads.
|
|
Buffering enabled in tee(1) was making tests more
difficult to debug.
|
|
This makes it easier to write/share code for multi-model tests.
|
|
We use the "G" global constant from the Rev model everywhere
to simplify things a little.
Test cases are more consistent now, too.
|
|
Since we do "Expect: 100-continue" handling, make sure
we read anything in the request body the client
will send us.
|
|
Makes it easier to track down empty files this way
|
|
|
|
Since we export "rainbows.model" to Rack now, we don't
have to worry about setting the "SLEEP_CLASS" env for
the application.
|
|
oops
|
|
|
|
Help ensure apps get the correct Rack environment to make
choices (if any) with.
|
|
all test files should have the executable bit set
|
|
We should try to send 400s back to the client if possible.
|