about summary refs log tree commit homepage
path: root/test
DateCommit message (Collapse)
2009-02-21Replace unicorn binary with something rackup-like
This adds a bunch of execution tests that require the "unicorn" binary to be in PATH as well as rack being directly "require"-able ("rubygems" will not be loaded for you). The tester is responsible for setting up PATH and RUBYLIB appropriately.
2009-02-21test_helper: cleanup requires
We don't need these dependencies slowing down load times on our tests..
2009-02-20test_upload: trap EPIPE if a connection shuts us down, too
Reset connections can also return EPIPE under Linux, not just ECONNRESET; so be sure to trap that error, too.
2009-02-20test_upload: close urandom fd at teardown
Prevent the GC from trying to close it (and hitting the wrong descriptor) when @random is reopened for running tests.
2009-02-14HttpResponse: remove crack-addled HTTP_STATUS_HEADERS hash
This also fixes a subtle bug in header generation when the +$,+ ($OFS) variable is defined to something other than nil or "" I'm really wondering what kind of drugs I was on (or _not_ on) when I modified some of this from the Mongrel source.
2009-02-13test_upload: fix rename under 1.8
Ruby 1.9 Tempfile objects can be passed directly to File.rename (instead of the pathname). This doesn't work in 1.8, so always just pass the pathname to File.rename.
2009-02-13Remove tempfile reuse from HttpRequest, upload tests
Tempfile reuse was over-engineered and the problem was not nearly as big a problem as initially thought. Additionally, it could lead to a subtle bug in an applications that link(2)s or rename(2)s the temporary file to a permanent location _without_ closing it after the request is done. Applications that suffer from the problem of directory bloat are still free to modify ENV['TMPDIR'] to influence the creation of Tempfiles.
2009-02-13tests: replace process_based_port with unused_port
unused_port is more reliable as it actually tries to bind a port and retries if it fails. This is also safe across parallel unicorn tests running in different directories.
2009-02-09Aggregate test results so they're more readable
Makes it much easier to track down failures if you know something failed in the first place. A failed test early on could be hidden because noise from successful tests drowned it out.
2009-02-09Remove test/ files we don't care about, update Manifest
We're not using them and they don't seem useful in any shape or form...
2009-02-09Remove hard dependency on Rack
While we'll support anything that exposes a Rack-like interface (a very good one IMHO), we shouldn't have a hard dependency on Rack to simplify testing. While we're at it, I'm not using Daemons anymore, either, since that does too many things behind our back as far as daemonization goes. As a result of not depending on Rubygems, either, I've sped up my "make -j" test ~1.5 seconds
2009-02-09Get rid of HeaderOut and simplify HttpResponse
Just stuff what little logic we had for it into HttpResponse since Rack takes care of the rest for us. Put the HTTP_STATUS_HEADERS hash in HttpResponse since we're the only user of it. Also, change HttpResponse.send to HttpResponse.write to avoid overriding the default method.
2009-02-09Support multiple listeners per-process
Use select(2) to multiplex non-blocking accept(2) calls between them. Additionally, aggressively make a bet after accepting clients where we'll try to do a non-blocking accept(2) against the full set of descriptors. This is based on the assumption that if we just accepted connections, we're probably reasonably busy. This should lead to lower latency under high load; but some wasted cycles when requests come in intermitently. By this same logic, we don't really care for the thundering herd problem, either; since it is only noticeable with many (hundreds) of processes when most of them are idle.
2009-02-09Simplify HttpResponse since we only handle Rack now
The previous API was very flexible, but I don't think many people really cared for it... We now repeatedly use the same HeaderOut in each process since I completely don't care for multithreading.
2009-02-09Remove threading and use worker processes instead
All tests for threading and semaphores have been removed. One test was changed because it depended on a shared variable. Tests will be replaced with tests to do process management instead.
2009-02-09s/Mongrel/Unicorn/g
Avoid conflicting with existing Mongrel libraries since we'll be incompatible and break things w/o disrupting Mongrel installations.
2009-02-09Allow running tests in parallel via gmake
Some of the tests here are horrifically slow due to sleeps, allow using gmake to run these tests in parallel. My Core2 Duo runs "make -j" over 10s faster than "rake".
2009-01-31No more special params hash.
2009-01-31Remove CGIWrapper.
2009-01-31Mongrel.run(app, opts)
2009-01-31Let the kernel schedule some shit.
2009-01-31Cleanup.
2009-01-31Started in test_server
2009-01-31Fixed test threading?
2009-01-31removed test_stats
2009-01-31Dead code.
2009-01-31Rename.
2009-01-31Removed bad requires
2009-01-31Merge pivotal code.
Breaks world. Added option to throttle number of concurrent threads processing requests. Conflicts: bin/mongrel_rails lib/mongrel.rb lib/mongrel/configurator.rb lib/mongrel/rails.rb test/unit/test_ws.rb
2009-01-31Removed test_command
2009-01-31Got rake working took out trash
2009-01-31Merge branch 'rack'
2008-12-04Removed uri_classifier, now we just use racks
2008-12-01Removed request_progress, make it a middlewear or something
2008-12-01Got rid of send_file test, moved to rack
2008-12-01Got rid of handlers and test_conditional, now people just use rack
2008-12-01Removed configurator, replaced by Racks UrlMap
2008-12-01Got tests working with rack
2008-11-22Remove debug.
2008-11-22Non working rack implementation
2008-11-22Added testing for rack support
2008-07-15http_parser: restore r996 (accept '"', '<', and '>' characters in URLs)
This seems to have gotten accidentally dropped during a merge: r1020 Some broken web browsers don't properly escape ", <, and > characters in URLs, however these URLs to occasionally legitimate and sometimes show up. This patch was submitted by Eden Li here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001845.html This patch was accepted by Zed Shaw here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001847.html git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1031 19e92222-5c0b-0410-8929-a290d50e31e9
2008-07-15Remove nasty_pound_header test since we've always failed it
ref: http://thread.gmane.org/gmane.comp.lang.ruby.mongrel.devel/37/focus=45 We got 'pen' mixed up with 'pound' in that thread but the gist of it is still relevant: these nasty headers are irrelevant. 'pound' is the only thing that's known to send these nasty headers and I (Eric Wong) don't consider pound relevant at all. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1030 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31Remove fixed port numbers used in tests, make tests more friendly to
CI tools. Use of #process_based_port as port number. Exclude DirHandler(nil) with absolute paths on Windows. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@999 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-24Backport Eric's changes to the http parser from trunk (Eric Wong).
Apply fix for Ragel 6 (Eric Wong, Ry Dahl). Two tests fail with the new parser (1 failed with the old parser). Needs investigation. Close #12 (mongrel_rails send_signal leaves a filehandle open until gc). Close #14 (mongrel_rails command line option --num-procs does not change the max number of procs). Close #15 (mongrel squashes helpful exception in register method). Close #16, XXX needs audit! (CGIWrapper "options" attr_reader has no corresponding @options variable). Close #20 (Mongrel doesn't erase temporary files during it's operation on windows). Close #19, XXX needs audit! (HttpResponse#reset does not properly reset HeaderOut). Close #22 (gem_plugin should load gems from Gem.path not Gem.dir). Close #23 (mongrel_cluster's mongrel_rails configuration option isn't fully respected). If I had git, being offline wouldn't have resulted in one massive commit. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@995 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-01Use correct requirement for test helper in test/unit/test_ws.rb (Eric Wong).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@986 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-23Add IOError to test exception list because JRuby trunk started throwing it ↵
instead of one of the old ones. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@981 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-20Move tools/trickletest into test/tools.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-1@974 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-20Move tests from tests/ into tests/unit/ so they parallel tests/benchmark. ↵
They are mainly unit tests anyway; we can clean them up more moving forward. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-1@973 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-20Add concurrency benchmarks, mostly copied from Thin's.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-1@971 19e92222-5c0b-0410-8929-a290d50e31e9