about summary refs log tree commit homepage
path: root/t
DateCommit message (Collapse)
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).
2009-11-25Fiber*: add Rainbows::Fiber.sleep method
It works exactly like Actor.sleep and similar to Kernel.sleep (no way to sleep indefinitely), but is compatible with the IO.select-based Fiber scheduler we run. This method only works within the context of a Rainbows! application dispatch.
2009-11-25add FiberPool concurrency model
This is another Fiber-based concurrency model that can exploit a streaming "rack.input" for clients. Spawning Fibers seems pretty fast, but maybe there are apps that will benefit from this.
2009-11-25add FiberSpawn concurrency model
This one seems a easy to get working and supports everything we need to support from the server perspective. Apps will need modified drivers, but it doesn't seem too hard to add more/better support for wrapping IO objects with Fiber::IO.
2009-11-24rework RevThreadSpawn without TeeInput and 1.8 support
Exposing a synchronous interface is too complicated for too little gain. Given the following factors: * basic ThreadSpawn performs admirably under REE 1.8 * both ThreadSpawn and Revactor work well under 1.9 * few applications/requests actually need a streaming "rack.input" We've decided its not worth the effort to attempt to support streaming rack.input at the moment. Instead, the new RevThreadSpawn model performs much better for most applications under Ruby 1.9
2009-11-18make keepalive_timeout configurable
And change the default to 2 seconds, most clients can render the page and load all URLs within 2 seconds.
2009-11-11tests: more stringent tests for error handling
Make sure any aborted/broken clients don't screw up our connection accounting.