Граф коммитов

436 Коммитов

Автор SHA1 Сообщение Дата
Jean byroot Boussier f19f132965
Update the README about exceptions (#196)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2021-04-14 14:49:13 -04:00
Jean byroot Boussier 2915fb9d85
Allow to configure the codec (#195)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2021-04-08 13:41:08 -04:00
Dylan Thacker-Smith d0e8d7e9fb
tests: Fix concurrency test falkiness from unintentional key overlap (#191) 2021-04-08 12:22:15 -04:00
Jean byroot Boussier 113c79ad55
Verify compaction references (#193)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2021-04-07 14:22:37 -04:00
Dylan Thacker-Smith 17bd81a840
Fix ConcurrencyTest that needs to clone the client for thread-safety (#189) 2021-04-06 16:48:32 -04:00
Dylan Thacker-Smith e78b20eb91 Remove a test that no longer gets a server error with latest memcached 2021-03-31 17:07:31 -07:00
Dylan Thacker-Smith 1ea8edd808 Fix require of renamed mocha minitest integration file 2021-03-31 16:27:53 -07:00
Dylan Thacker-Smith 0b1431d0ae Fix missing require for socket standard library 2021-03-31 16:27:53 -07:00
Dylan Thacker-Smith 3c7f828745 Make namespace setter persist across connections 2016-10-02 17:40:39 -04:00
Arthur Neves 5736e251d4
add some threads tests 2016-03-26 09:55:11 -04:00
Arthur Neves 09b63ab580
Add authentication test 2016-03-25 17:41:54 -04:00
Arthur Neves efb088515d
Return flags on gets
Also use the flags on the coders to decode if necessary
2016-03-20 12:46:48 -04:00
Arthur Neves 5f015a12fe
Enable UDP tests 2016-03-19 23:53:31 -04:00
Vicent Marti 0544f5ea56 client: Use Memcached's default syntax for weight
A server's weight is now defined by an optional `/?weight` at the end of
the server string. This matches the official syntax in Memcached and
reduces ambiguities (e.g. in cases where you want to use a server
without specifying a port but specifying its weight).
2016-03-16 14:46:43 +01:00
Vicent Marti c6e00847fa client-test: Reenable the key-with-null test
This test should be working now that we're properly handling the full
length of keys using the Ruby C APi.
2016-03-16 11:53:14 +01:00
Vicent Marti 120ebd155b client-test: Remove unused tests 2016-03-16 11:53:05 +01:00
Vicent Marti d2496275f5 client: Initialize using a config string
The libmemcached APIs to add weighted servers to a client are not widely
available in all releases of libmemcached.

To work around this, we're now using the `memcached(const char*,
size_t)` API, which is recommended by the authors as the standard way to
initialize the client.

See: http://docs.libmemcached.org/libmemcached_configuration.html

The constructor for Memcached::Connection now takes a configuration
string. To keep the external API unchanged, Memcached::Client#new now
parses the array of servers and creates a configuration string that will
be passed to the connection.

Alternatively, you can pass directly a configuration string to
Client#new and that will be used in place of the array of servers.

A new static method Connection#check_config! has been added so we can
eagerly verify that user supplied config strings are valid.
2016-03-16 11:49:33 +01:00
Vicent Marti e1a162c131 behavior: move most of the behavior parsing code to Ruby
All the complex C code for turning strings into the actual Memcached
behavior constants has been ported to Ruby. The resulting APIs should be
functionally equivalent, but now users have much more freedom when
setting and using behaviors.

The following calls are all now valid and equivalent:

    conn.set_behavior(MEMCACHED_BEHAVIOR_HASH, MEMCACHED_HASH_JENKINS)
    conn.set_behavior(MEMCACHED_BEHAVIOR_HASH, 'MEMCACHED_HASH_JENKINS')
    conn.set_behavior(MEMCACHED_BEHAVIOR_HASH, 'JENKINS')
    conn.set_behavior(MEMCACHED_BEHAVIOR_HASH, 'jenkins')
    conn.set_behavior(MEMCACHED_BEHAVIOR_HASH, 3)
    conn.set_behavior('MEMCACHED_BEHAVIOR_HASH', 3)
    conn.set_behavior('hash', 3)

    # this should be the preferred usage
    conn.set_behavior('hash', 'jenkins')
2016-03-16 11:45:48 +01:00
Vicent Marti 2608d41e3a Fix Ruby warnings
Miscellaneous warnings regarding Ruby syntax (shown in Ruby 2.1+)
2016-03-16 11:42:48 +01:00
Arthur Neves c9fdb406ea Make sure we dont connect on client new 2016-03-15 20:19:47 -04:00
Arthur Neves ec0cb5d856 Add reset method 2016-03-15 20:12:59 -04:00
Arthur Neves 50d8171db8 Add touch method 2016-03-15 18:48:38 -04:00
Arthur Neves 63fc043da5 Add more behavior tests 2016-03-15 18:30:40 -04:00
Arthur Neves 7d3aa3e61b Add behavior tests
Add value lookup by KEY and STRING
2016-03-15 18:06:44 -04:00
Arthur Neves 07984cbc47 Add options back to tests. 2016-03-15 11:41:19 -04:00
Arthur Neves 7e1af9eb22 Fix clone method 2016-03-15 11:40:54 -04:00
Arthur Neves bfd0404f87 Port consistent hashing test 2016-03-14 22:35:43 -04:00
Arthur Neves 9b28b104a7 No need to test hashing algorithm 2016-03-14 22:33:34 -04:00
Arthur Neves 4ecaaafd3a More tests 2016-03-14 22:32:51 -04:00
Arthur Neves 0f0aaf3b19 Add clone method 2016-03-14 22:27:51 -04:00
Arthur Neves 9d67a5403e more fixes on benchmark file 2016-03-14 14:52:09 -04:00
Arthur Neves 8126638c5d update benchmarks to use new client 2016-03-14 14:24:59 -04:00
Arthur Neves 262eff97a3 Add some timeout errors 2016-03-14 00:37:07 -04:00
Arthur Neves 96d0c8340f Enable get prefix test 2016-03-14 00:14:51 -04:00
Arthur Neves e63dabc188 Handle prefix key on connection 2016-03-14 00:10:10 -04:00
Arthur Neves eda665cfe4 Add more options 2016-03-13 23:25:54 -04:00
Arthur Neves 38e8854700 Handle no-block 2016-03-12 21:34:48 -05:00
Arthur Neves bca19016d6 enable binary tests 2016-03-11 17:46:45 -05:00
Arthur Neves 8efa44489a Add binary cache
Also flush on teardown instead'
2016-03-11 17:38:49 -05:00
Arthur Neves cae701439d remove miss placed test 2016-03-11 17:32:11 -05:00
Arthur Neves f184b5b0b2 More tests 2016-03-11 17:07:39 -05:00
Arthur Neves 452e45eb11 More tests 2016-03-11 16:32:35 -05:00
Arthur Neves 8a271ceb32 Verify keys by default 2016-03-09 09:23:45 -05:00
Arthur Neves 32d64486ab Error handleing 2016-03-08 23:50:43 -05:00
Arthur Neves b80aafacf7 Prepend and append methods 2016-03-06 22:07:38 -05:00
Arthur Neves 7e1e8d06bb Replace method 2016-03-06 21:02:26 -05:00
Arthur Neves a0ce21ae3f Exist method 2016-03-06 20:55:54 -05:00
Arthur Neves 6d2ebab6ad add inc and dec methods 2016-03-05 18:45:23 -05:00
Arthur Neves 997dadee3f use base test class 2016-03-05 18:22:48 -05:00
Arthur Neves 6db5ce0cf9 Some refactoring on setup 2016-03-05 18:16:15 -05:00