about summary refs log tree commit homepage
path: root/test/test_client_expire.rb
DateCommit message (Collapse)
2016-05-15test/test_client_expire: fix for high RLIMIT_NOFILE
The ab(1) command we use for testing is limited to 20000 open connections under Debian jessie; a perfectly reasonable limit to avoid port exhaustion. I never noticed this limit before, but systemd under Jessie seems to have upped the default RLIMIT_NOFILE to 65536(!), causing ab to error out. We don't even need 10K connections for testing, we just need to hit *some* limit before we start expiring. So lower the RLIMIT_NOFILE back to 1024 in the forked server process so we can test more quickly without running out of ports or memory, since exhausting the 65536 RLIMIT_NOFILE limit is not going to happen with a single TCP address.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02enable frozen_string_literal for Ruby 2.3+
There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-07-21test_client_expire: favor Process.spawn over fork+exec
Process.spawn is faster under Linux since it may use vfork to avoid marking pages copy-on-write.
2014-02-08test_client_expire: add delays for non-Linux OSes
Not all TCP stacks behave the same with timing-sensitive tests. Fortunately these timing differences aren't very critical over real networks.
2013-12-27tests: document and check for ab(1) dependency
ab(1) is less common than our other dependencies, so allow tests to run without it.
2013-11-01config: allow Float for timeouts
Some users may care to have sub-second or fractional timeouts for various reasons. Do not reject those values to be consistent with Ruby sleep/select.
2013-10-26test_client_expire: disable output buffering in test
We may end up buffering on headers and hitting EMFILE/ENFILE this way, too. We need to figure out a way to recover from this.
2013-10-26tests: increase mkserver use to reduce LoC
This reduces the amount of code we have in our tests to improve maintainability.
2013-10-24tests: enable checks for desperate client expiry
Walking ObjectSpace should be acceptable for this test (due to MT FD allocation). Using check_client_connection saves us a bunch of time when recovering from an overload scenario.
2013-10-22tests: enforce close_on_exec on all client sockets
Leaking file descriptors may lead to out-of-FD situations in an MT test suite.
2013-10-22tests: do not lose exceptions on quit timeouts
We should see the reason for test failures.
2013-10-21tests: support disabling parallelization env
Temporarily disabling parallel tests maybe needed to diagnose some problems with tests.
2013-10-18test: cleanup socket usage and lifetimes
This should help prevent us from running out of FDs prematurely as our test suite becomes more multi-threaded. We can also use plain TCPSocket in tests where we inherit the file descriptor from the parent (w/o accept).
2013-10-18test_client_expire: WIP test for EMFILE expiry
Unfortunately, this will need further work because tests are MT and FD counts vary, so reproducing reliable FD counts will need to rely on exec + FD_CLOEXEC.
2013-10-18test and fix client expiry
This is rarely-called code, but we need to be sure we can expire clients correctly when thresholds are reached. We also correctly handle negative values of the client_expire_threshold directive.