about summary refs log tree commit homepage
path: root/t
DateCommit message (Collapse)
2011-04-01bump dependencies for testing
No need to use an ancient Rack now that we've dropped Rails 2.3.x tests. We need to remember that Rack 1.1.0 doesn't support input#size.
2011-02-10Revert "test_helper: simplify random port binding"
This causes conflicts with ports clients may use in the ephemeral range since those do not hold FS locks. This reverts commit e597e594ad88dc02d70f7d3521d0d3bdc23739bb. Conflicts: test/test_helper.rb
2011-02-02test_helper: simplify random port binding
Duh...
2011-01-05close client socket after closing response body
Response bodies may capture the block passed to each and save it for body.close, so don't close the socket before we have a chance to call body.close
2010-12-21http: hook up "trust_x_forwarded" to configurator
More config bloat, sadly this is necessary for Rainbows! :<
2010-12-09allow client_buffer_body_size to be tuned
Since modern machines have more memory these days and clients are sending more data, avoiding potentially slow filesystem operations for larger uploads can be useful for some applications.
2010-12-09configurator: ensure examples in FAQ still work
This has been broken since 2.0.x Internal cleanups sometimes have unintended consequences :<
2010-12-09tee_input: fix accounting error on corked requests
In case a request sends the header and buffer as one packet, TeeInput relying on accounting info from StreamInput is harmful as StreamInput will buffer in memory outside of TeeInput's control. This bug is triggered by calling env["rack.input"].size or env["rack.input"].rewind before to read.
2010-11-18tests: add parser error test from Rainbows!
This will help ensure we trap our own errors properly in the future.
2010-11-18add missing test files
oops :x
2010-11-11configurator: enable "rewindable_input" directive
This allows users to override the current Rack spec and disable the rewindable input requirement. This can allow applications to use less I/O to minimize the performance impact when processing uploads.
2010-10-28t0012: fix race condition in reload
We need to ensure the old worker is reaped before sending new requests intended for the new worker.
2010-10-27configurator: reloading with unset values restores default
If a configuration directive is set at startup and later unset, it correctly restores the original default value as if it had never been set in the first place. This applies to the majority of the configuration values with a few exceptions: * This only applies to stderr_path and stdout_path when daemonized (the usual case, they'll be redirected to "/dev/null"). When NOT daemonized, we cannot easily redirect back to the original stdout/stderr destinations. * Unsetting working_directory does not restore the original working directory where Unicorn was started. As far as we can tell unsetting this after setting it is rarely desirable and greatly increases the probability of user error.
2010-10-09add PrereadInput middleware to get around TeeInput
This may be useful for some apps that wish to drain the body before acquiring an app-wide lock. Maybe it's more useful with Rainbows!...
2010-10-08build: automatically call isolate on updates
Automation is nice, the makefile needs some cleanup
2010-10-04split out isolate usage/logic
We'll be using more of Isolate in development.
2010-10-04avoid unlinking actively listening sockets
While we've always unlinked dead sockets from nuked/leftover processes, blindly unlinking them can cause unnecessary failures when an active process is already listening on them. We now make a simple connect(2) check to ensure the socket is not in use before unlinking it. Thanks to Jordan Ritter for the detailed bug report leading to this fix. ref: http://mid.gmane.org/8D95A44B-A098-43BE-B532-7D74BD957F31@darkridge.com
2010-08-30update Rails 3 tests to use Rails 3 final
Rails 3 is out, and requires no code changes on our end to work (as far as our tests show :)
2010-08-30remove nasty ugly hacks at startup
These nasty hacks were breaking Rubinius compatibility. This can be further cleaned up, too.
2010-08-28update Rails3 tests to use 3.0.0rc2
No code changes needed, thankfully.
2010-08-07log ERROR messages if workers exit with failure
Something is wrong if workers exit with a non-zero status, so we'll increase the log level to help prevent people from missing it.
2010-07-16SIGTTIN works after SIGWINCH
In addition to SIGHUP, it should be possible to gradually bring workers back up (to avoid overloading the machine) when rolling back upgrades after SIGWINCH. Noticed-by: Lawrence Pit ref: http://mid.gmane.org/4C3F8C9F.2090903@gmail.com
2010-07-13SIGHUP deals w/ dual master pid path scenario
As described in our SIGNALS documentation, sending SIGHUP to the old master (to respawn SIGWINCH-ed children) while the new master (spawned from SIGUSR2) is active is useful for backing out of an upgrade before sending SIGQUIT to the new master. Unfortunately, the SIGHUP signal to the old master will cause the ".oldbin" pid file to be reset to the non-".oldbin" version and thus attempt to clobber the pid file in use by the to-be-terminated new master process. Thanks to the previous commit to prevent redaemonization in the new master, the old master can reliably detect if the new master is active while it is reloading the config file. Thanks to Lawrence Pit for discovering this bug. ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com
2010-06-17t030[34]: proper temporary UNIX domain socket handling
test-lib handles variables named "*socket" (and "*fifo") differently than ordinary variables.
2010-06-17tests: extra working_directory integration cases
Our fugly code can't handle embedded command-line options in config.ru when using Rubinius yet. So add some related tests to the ones marked RBX_SKIP that don't rely on embedded command-line options.
2010-06-15workaround rbx not reopening logs to stderr/stdout
While log reopening worked reliably for newly-created File objects in the unit tests, the $stderr and $stdout handles that get redirected did not get reopened reliably under Rubinius. We work around this by relying on Rubinius internals and directly setting the @path instance variable. This is harmless for MRI and should be harmless for other any other Ruby implementations we'll eventually support. ref: http://github.com/evanphx/rubinius/issues/360
2010-06-11t0005: Ruby 1.9.2 $LOAD_PATH fix
Ruby 1.9.2 no longer adds the current directory to $LOAD_PATH automatically.
2010-06-10test to ensure "unicorn fooapp.rb" respects working_directory
2010-06-10add test for erroring out when config.ru is bad
2010-06-10t0303: extra test for multiple listeners
We share the same array from the original bin/* down into the Configurator.
2010-06-10tests: fix sha1 calculation for non-random_blob
This was commit abc207b2918606867094f2820bab58223e99aac4 from rainbows.git
2010-06-10t0303: set executable bit
2010-06-10my-tap-lib: fix race condition in verbose mode
Don't try to redirect until we know our FIFO consumers are ready for us. This only seems to happen with bash and not ksh...
2010-06-10tests: skip config.ru parsing tests under rbx
eval("...", TOPLEVEL_BINDING) is broken for us in Rubinius (And our code is extremely nasty as well :x) ref: http://github.com/evanphx/rubinius/issues/357
2010-06-10fix alt-working_directory behavior for Rails 3
2010-06-10unicorn_rails: no need to load ActionDispatch::Static
Rails 3 will automatically load it for us.
2010-06-10tests: split out host/port extraction from listen
more tests may use it
2010-06-10tests: update Rails 3 tests to Rails 3 beta4
2010-06-10respect "working_directory" wrt config.ru
Since we added support for the "working_directory" parameter, it often became unclear where/when certain paths would be bound. There are some extremely nasty dependencies and ordering issues when doing this. It's all pretty fragile, but works for now and we even have a full integration test to keep it working. I plan on cleaning this up 2.x.x to be less offensive to look at (Rainbows! and Zbatery are a bit tied to this at the moment). Thanks to Pierre Baillet for reporting this. ref: http://mid.gmane.org/AANLkTimKb7JARr_69nfVrJLvMZH3Gvs1o_KwZFLKfuxy@mail.gmail.com
2010-06-10tests: set NO_PROXY when running tests
It's a good idea to use a caching http_proxy to save bandwidth when isolating gems for different Ruby versions.
2010-06-08tests: add Rails 3 test for the missing config.ru case
In case we have weird Rails 3 users who choose to ignore config.ru, we'll be ready.
2010-06-08tests: libify common rails3 setup code
We'll be adding more Rails 3 tests..
2010-06-08t0300: Rails 3 test actually uses unicorn_rails
Oops, but unicorn_rails appears to work well here
2010-06-08update test infrastructure to run Rubinius tests
In parallel with other of Rubies, of course. We need to rely on RUBY_ENGINE since RUBY_VERSION is 1.8.7 and that conflicts with the most popular MRI version. Since Rubinius doesn't support some command-line options, we still need to rely on MRI for a few things. Also fixing an embarrassing UUoC in the process.
2010-06-03test: rails 3: automatically run isolate if needed
should be safe enough...
2010-06-03tests: add preliminary Rails 3 tests
We'll be switching to Isolate and shell-based tests since the old test/unit-based Rails test was basically a shell script written in Ruby.
2010-02-18Unicorn::builder to wrap our Rack::Builder usage
This should make it easier to reuse code in derivative servers like Rainbows! and Zbatery. Unfortunately, we can't depend on Rack::Builder/Rack::Server yet since Rack 1.1 just got them and notable frameworks (like Rails 2.3.x) do not fully work with Rack 1.1 yet). This also fixes subtle issue with config.ru files that could have variables that conflict with the Unicorn-specific namespace (this bug still affects "unicorn_rails", which could use some reworking as well).
2010-02-18graceful handling of bad config.ru + HUP w/ preload_app
If preload_app is true and Unicorn is HUP-ed with a bad config.ru, then it would be possible to have Unicorn in a bad state and constantly throw 500 errors. We now detect syntax and load errors since they're likely to appear in modified Rackup files, and will restore the original app if reloading failed.
2010-02-17test-lib: don't croak if "error" is in the test name
2010-02-17tests: import basic TAP library from Rainbows!