headius/jruby-spymemcached — pull request #5 by robrasmussen (2012-03-13 07:47:08+00:00)
Title: Tests for additional memcached operations added

Added tests to exercise new methods. The tests expect you to have a local memcached server running, seemed better than using mocks but if you'd prefer different approach let me know and I'll change it.

Tests run clean for me:`

ruby basic_test.rb
2012-03-13 02:45:16.740 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-03-13 02:45:16.743 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-03-13 02:45:16.743 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@659e733e
2012-03-13 02:45:16.743 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@4ed7581b
Loaded suite basic_test
Started
.......2012-03-13 02:45:16.843 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-03-13 02:45:16.843 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@64811e10
2012-03-13 02:45:16.844 WARN net.spy.memcached.MemcachedConnection: Could not redistribute to another node, retrying primary node for jruby:yes.
2012-03-13 02:45:16.846 INFO net.spy.memcached.MemcachedClient: Shut down memcached client
..2012-03-13 02:45:16.858 INFO net.spy.memcached.MemcachedClient: Shut down memcached client
2012-03-13 02:45:16.859 INFO net.spy.memcached.MemcachedClient: Shut down memcached client
.
Finished in 0.085000 seconds.

10 tests, 11 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 35839