SocketHarness is a test utilities that helps implement Test Harness pattern from the book "Release it!". It seats between application and integration server to simulate odd network/server behaviors.
Current Feature:
- delay: help for simulating slow network or server to test timeout failure mode.
Add this line to your application's Gemfile:
gem 'socket_harness'
And then execute:
$ bundle
Or install it yourself as:
$ gem install socket_harness
Usage: bin/socket_harness [options] remotehost remoteport
-p, --port PORT local port to bind
-b, --bind ADDRESS local address to bind
--block-size NUMBER chunck out large data reads. by default 1024 byte
-d, --delay NUMBER delay for client response: 12 will deplay 12ms for package sending back to the client.
- Fork it ( http://github.com//socket_harness/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request