about summary refs log tree commit homepage
path: root/t
DateCommit message (Collapse)
2010-06-04tests: disable async_sinatra test for Ruby 1.9.2
Sinatra 0.9.4 does not appear to be compatible with Ruby 1.9.2...
2010-06-04test-lib: set NO_PROXY to counter http_proxy
Some testers (like myself) use http_proxy when isolating gems to avoid wasting bandwidth, but we don't proxy requests to localhost.
2010-06-03depend on Isolate ~> 2.0.2 for development
It's useful given all the Gems we support but don't have hard installation dependencies on.
2010-06-03add Rainbows::Sendfile middleware
This lets most concurrency models understand and process X-Sendfile efficiently with IO.copy_stream under Ruby 1.9. EventMachine can take advantage of this middleware under both Ruby 1.8 and Ruby 1.9.
2010-06-03writer_thread_*: fix static file response under 1.8
While these models are designed to work with IO.copy_stream under Ruby 1.9, it should be possible to run them under Ruby 1.8 without returning corrupt responses. The large file response test is beefed up to compare SHA1 checksums of the served file, not just sizes.
2010-06-03test-lib: remove ancient wait_for_pid() function
It hasn't been used since the first month of development when we started using FIFOs
2010-05-28tests: t0005: fudge the file malloc limit a bit
it's hard to make this test reliable, but try to add a small fudge factor based on the MRI default GC malloc limit.
2010-05-26add WriterThreadSpawn concurrency model
2010-05-22tests: ignore trash/ directory entirely
This allows it to be a symlink to /dev/shm or similar
2010-05-20tests: chunked client_body_max_size fails with old curl
curl < 7.18.0 did not check for errors when doing chunked uploads. Unfortunately some distros are slow moving and bundle ancient versions of curl.
2010-05-20tests: t0004: beef up test for kills
since we don't set maximum time boundaries, just rely on the logs to properly log the dead processes.
2010-05-20tests: t0004: disable upper limit check
since we've already waited for time to elapse, there's no point in watching the upper limit here
2010-05-20tests: t0005: minimize writes
This test can cause a lot of I/O, especially when run in parallel. Just rely on the fixed rsha1 code to compute the SHA1 of the response.
2010-05-20tests: fix sha1sum usage
non-random_blob arguments weren't being taken into account correctly :x
2010-05-20tests: t0005 - disable concurrency for this test
slow test runners can buffer us and bloat memory usage unpredictably when tests are run under load
2010-05-19tests: t0007: robustness fix
On busy sytems, this timing-sensitive test is likely to fail, so give it some extra slack
2010-05-14add WriterThreadPool concurrency model
This is based on an idea I originally had for Unicorn but never implemented in Unicorn since the benefits were unproven and the risks were too high.
2010-05-14test: do not let async-response run with Base
2010-05-04eventmachine: "rack.multithread" is always true when deferring
Since deferred requests run in a separate thread, this affects the root (non-deferred) thread as well since it may share data with other threads.
2010-05-04drop EventMachineDefer concurrency model
Since we have conditional deferred execution in the regular EventMachine concurrency model, we can drop this one. This concurrency model never fully worked due to lack of graceful shut downs, and was never promoted nor supported, either.
2010-05-04eventmachine: add app.deferred?(env) support as middleware
Merb (and possibly other) frameworks that support conditionally deferred app dispatch can now use it just like Ebb and Thin. http://brainspl.at/articles/2008/04/18/deferred-requests-with-merb-ebb-and-thin
2010-05-03t0100: rack-input-hammer tests identity encodings, too
It turns out we were painfully lacking in tests for HTTP requests where the Content-Length header _is_ set.
2010-05-03add client_max_body_size config directive
Since Rainbows! is supported when exposed directly to the Internet, administrators may want to limit the amount of data a user may upload in a single request body to prevent a denial-of-service via disk space exhaustion. This amount may be specified in bytes, the default limit being 1024*1024 bytes (1 megabyte). To override this default, a user may specify `client_max_body_size' in the Rainbows! block of their server config file: Rainbows! do client_max_body_size 10 * 1024 * 1024 end Clients that exceed the limit will get a "413 Request Entity Too Large" response if the request body is too large and the connection will close. For chunked requests, we have no choice but to interrupt during the client upload since we have no prior knowledge of the request body size.
2010-05-03t0401: do not leave lingering tail(1) processes
Since Rainbows! allows for graceful termination, let EM kill and reap the tail(1) processes it spawned.
2010-04-19add test for the rack-fiber_pool gem with EventMachine
Although advertised as being Thin-only, the rack-fiber_pool gem works with our EventMachine concurrency model as well. Note that it's impossible to expose the streaming "rack.input" behavior of the native FiberSpawn/FiberPool models via middleware, but most people don't need streaming a "rack.input" See http://github.com/mperham/rack-fiber_pool for more details on the rack-fiber_pool gem.
2010-03-26async_examples/async_app: avoid needless UTF-8
Unicorn stopped reading all config.ru files as binary starting with 0.97.0 for compatibility with rackup(1), so systems that defaulted to US-ASCII encoding would have trouble running this.
2010-02-24switch to Unicorn.builder, depend on Unicorn 0.97.0+
The Unicorn.builder helper will help us avoid namespace conflicts inside config.ru, allowing us to pass tests. While we're at it, port some tests over from the latest unicorn.git for dealing with bad configs.
2010-02-20test-lib: make FIFO start check an after_fork hook
enabling ready_pipe in Unicorn 0.96.0 breaks this.
2010-02-20test-lib: remove needless fd closing
too dangerous with the ready_pipe feature in Unicorn 0.96+
2010-02-08t/bin/*: encoding should be the first line after shebang
Ruby 1.9 will complain otherwise
2010-01-08add Cramp integration tests
Tested with cramp-0.7 and eventmachine 0.12.10
2010-01-07Update docs + tests to reflect Rev 0.3.2 release
Rev 0.3.2 makes performance with Threads* under Ruby 1.8 tolerable.
2009-12-30EventMachine: support deferrables in responses
Some async apps rely on more than just "async.callback" and make full use of Deferrables provided by the EM::Deferrable module. Thanks to James Tucker for bringing this to our attention.
2009-12-29quiet spurious wakeups for accept() in Thread* models
Under all MRI 1.8, a blocking Socket#accept Ruby method (needs to[1]) translate to a non-blocking accept(2) system call that may wake up threads/processes unnecessarily. Unfortunately, we failed to trap and ignore EAGAIN in those cases. This issue did not affect Ruby 1.9 running under modern Linux kernels where a _blocking_ accept(2) system call is not (easily, at least) susceptible to spurious wakeups. Non-Linux systems running Ruby 1.9 may be affected. [1] - using a blocking accept(2) on a shared socket with green threads is dangerous, as noted in commit ee7fe220ccbc991e1e7cbe982caf48e3303274c7 (and commit 451ca6997b4f298b436605b7f0af75f369320425)
2009-12-22common Rainbows.sleep(nr) method
We'll export this across the board to all Rack applications to sleep with. This provides the optimum method of sleeping regardless of the concurrency model you choose. This method is still highly not recommended for pure event-driven models like Rev or EventMachine (but the threaded/fiber/actor-based variants are fine).
2009-12-22tests: enable RevFiberSpawn for 1.9
2009-12-22new RevFiberSpawn concurrency model
This is like the traditional FiberSpawn, but more scalable (but not necessarily faster) as it can use epoll or kqueue.
2009-12-08EventMachineDefer: preliminary (and) broken version
There's a good chunk of tests that fail with this, still. Worse, I haven't been able to figure out what's wrong since it looks like it would involve looking at C++ code...
2009-12-02add RevThreadPool concurrency model
This should be like RevThreadSpawn except with more predictable performance (but higher memory usage under low load).
2009-11-29preliminary NeverBlock support with EventMachine
2009-11-28tests: more stringent error checking in logs
If we logged "ERROR", we should know about it.
2009-11-28tests: +x broken app test, fix config file setup
2009-11-28always set FD_CLOEXEC if available
Some people fork processes, so it avoid hanging a connection open because of that...
2009-11-27tests: fix bugs with dash in GNUmakefile
One bad thing to defaulting to ksh93 for my tests during development, small cleanups while we're at it, too for extra checks
2009-11-27tests: no need to limit t9000 in multiple places
The test itself already exits immediately if it's running an incompatible concurrency model, so avoid having redundant logic in the GNUmakefile.
2009-11-26tests: enable AppPool test for Revactor and Fiber*
2009-11-26tests: "models" variable may be set in gmake CLI
This lets us make further tests for compatibility without dirtying our working tree.
2009-11-26cleanup and refactor error handling
Make sure app errors get logged correctly, and we no longer return a 500 response when a client EOFs the write end (but not the read end) of a connection.
2009-11-26Fiber*: cleanup scheduling, fix keepalive
Both FiberSpawn and FiberPool share similar main loops, the only difference being the handling of connection acceptance. So move the scheduler into it's own function for consistency. We'll also correctly implement keepalive timeout so clients get disconnected at the right time.
2009-11-25AppPool middleware now compatible with Fibers
This enables the safe use of Rainbows::AppPool with all concurrency models, not just threaded ones. AppPool is now effective with *all* Fiber-based concurrency models including Revactor (and of course the new Fiber{Pool,Spawn} ones).