about summary refs log tree commit homepage
path: root/t
DateCommit message (Collapse)
2009-10-18tests: predictable and simpler tempfile management
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.
2009-10-18tests: DWIM FIFO creation
If we're going to name a variable "fifo", it'll be for descriptive reasons...
2009-10-18tests: more reliable error checking
We now check for SIGKILL, too
2009-10-18rev: async response bodies with DevFdResponse middleware
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.
2009-10-17tests: for log reopening for all concurrency models
2009-10-17tests: rack.input hammer concurrency testing
2009-10-17tests: common basic HTTP tests for all models
We support pipelining, keepalive, and even HTTP/0.9!
2009-10-17tests: DRY require tests for Rev/Revactor
2009-10-17test-lib: quiet down pipefail error message
We'll spit out a proper warning later anyways...
2009-10-17tests: DRY Ruby requires based on model
2009-10-17tests: DRY setting of the "model" environment var
2009-10-17tests: factor out a common parser error "library"
2009-10-17tests: fix random_blob dependency
2009-10-17tests: fix issues with non-portable shell constructs
At least these tests all run with dash now, but ksh93 or bash is still recommended for pipefail
2009-10-17tests: rack.input trailer tests for all models
Just in case we break something. Also add staggered blob test to simulate slow client uploads.
2009-10-17tests: add unbuffered tee(1)-like helper
Buffering enabled in tee(1) was making tests more difficult to debug.
2009-10-17tests: introduce require_for_model function
This makes it easier to write/share code for multi-model tests.
2009-10-17refactor graceful shutdowns again, harder
We use the "G" global constant from the Rev model everywhere to simplify things a little. Test cases are more consistent now, too.
2009-10-17tests: sleep.ru slurps rack.input stream
Since we do "Expect: 100-continue" handling, make sure we read anything in the request body the client will send us.
2009-10-17test-lib: dbgcat adds headers with key name
Makes it easier to track down empty files this way
2009-10-17tests: sleep.ru handles "Expect: 100-continue"
2009-10-17Revactor tests can sleep more easily
Since we export "rainbows.model" to Rack now, we don't have to worry about setting the "SLEEP_CLASS" env for the application.
2009-10-15t4003: chmod +x
oops
2009-10-15Add Rainbows::AppPool Rack middleware
2009-10-14tests: enforce rack.multithread and rainbows.model
Help ensure apps get the correct Rack environment to make choices (if any) with.
2009-10-14t3003: set executable bit
all test files should have the executable bit set
2009-10-14Rev: fix error handling for parser errors
We should try to send 400s back to the client if possible.
2009-10-14preliminary Rev support
There is no TeeInput (streaming request body) support, yet, as that does not seem fun nor easy to do (or even possible without using Threads or Fibers or something to save/restore the stack...)
2009-10-12tests: add reopen logs test for revactor
Just in case Rev/Revactor does weird things when faced with signals.
2009-10-12tests: check for common exceptions with "Error"
And fix existing tests that use "grep -v" since that is almost always true...
2009-10-11Fix graceful shutdowns for threaded models
They were completely broken in the refactoring :x
2009-10-11revactor: fix graceful shutdown timeouts
2009-10-10tests: create a bad exit code by default
In case the test doesn't complete and somehow doesn't write the exit code, we always want to start with one.
2009-10-10tests: update TRACER examples in makefile
2009-10-10tests: TEST_OPTS => SH_TEST_OPTS
These variables are only for shells in tests
2009-10-10README for test suite
2009-10-10tests: enable pipefail shell option if possible
pipefail is extremely useful for detecting bad exits _anywhere_ in pipelines, not just the last command. Combined with "set -e", pipefail leads to very unforgiving scripts that bail out at the first sign of error, exactly what we want in tests.
2009-10-08tests: add revactor pipelining/keepalive test
Revactor model uses a different process_client method than our Thread* models.
2009-10-08tests: add dbgcat() utility method
Useful for prefixing individual lines of a temporary file while catting it to stdout. This helps make tests easier to write and test.
2009-10-08tests: simplify temporary file management
Since we rely heavily on temporary files in tests, make sure management of them is easy and reliable.
2009-10-07t0000: basic test includes keepalive + pipelining
2009-10-06tests: move trash files to their own trash/ directory
Avoid cluttering the directory we write tests in
2009-10-06tests: generate random_blob once for all tests
We don't need to repeatedly waste cycles and memory bandwidth to generate random throwaway data.
2009-10-05cleanup temporary file usage in tests
mktemp(1) requires files to end with "XXXXXXXX", not just have that template anywhere. Also, add pid files to the TEST_RM_LIST since test failures can leave a pid file dangling. Lastly, since the config.ru files are 100% static, just check them as standalone files in instead of allocating a tempfile on them for easier maintenance.
2009-10-05tests: allow "make V=2" to set TEST_OPTS += -x
Normally we can run "make V=1" for medium verbosity
2009-10-05tests: quiet down bin installation
2009-10-05Avoid naming names in LICENSE/README files
Everything is logged in git anyways and it'll be easier to hand off to somebody else.
2009-10-05test for Revactor::TeeInput
We'll be able to use the SHA1 test in other places, too.
2009-10-04Add support for the ThreadSpawn concurrency model
This is somewhat like the original model found in Mongrel, except we refuse to accept() connections unless we have slots available. Even though we support multiple listen sockets, we only accept() synchronously to simplify processing and to avoid having to synchronize ThreadGroup management.
2009-10-04Add new test suite and basic cases
I'd rather write shell scripts in shell than shell scripts in Ruby like was done with Unicorn. We're a *nix-only project so we'll embrace *nix tools to their fullest extent and as a pleasant side-effect these test cases are immune to internal API changes.