665 Commits

Author SHA1 Message Date
antirez
248ed2d3f1 Geo: removed JSON failing test (false positive)
Server output is matched to a pre-computed output. The last digits
differ because of rouding errors.
2015-06-22 11:16:36 +02:00
Matt Stancliff
b9136b5aee [In-Progress] Add Geo Commands
Current todo:
  - replace functions in zset.{c,h} with a new unified Redis
    zset access API.

Once we get the zset interface fixed, we can squash
relevant commits in this branch and have one nice commit
to merge into unstable.

This commit adds:
  - Geo commands
  - Tests; runnable with: ./runtest --single unit/geo
  - Geo helpers in deps/geohash-int/
  - src/geo.{c,h} and src/geojson.{c,h} implementing geo commands
  - Updated build configurations to get everything working
  - TEMPORARY: src/zset.{c,h} implementing zset score and zset
    range reading without writing to client output buffers.
  - Modified linkage of one t_zset.c function for use in zset.c

Conflicts:
	src/Makefile
	src/redis.c
2015-06-22 09:07:13 +02:00
antirez
e5c00e6d3a Test: ZADD CH tests 2015-05-29 11:34:43 +02:00
antirez
1372f1fb0f Test: ZADD INCR test 2015-05-29 11:28:52 +02:00
antirez
034d1b5046 Test: ZADD NX and XX options tests 2015-05-29 11:23:49 +02:00
antirez
d18079ef5e Merge branch 'sentinel-32' into unstable 2015-05-19 12:26:57 +02:00
antirez
c27fc1eea1 Sentinel: CKQUORUM tests 2015-05-19 12:26:09 +02:00
Glenn Nethercutt
d8390522cb uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest 2015-04-17 09:27:54 -04:00
antirez
2684b76b66 Test: be more patient waiting for servers to exit.
This should likely fix a false positive when running with the --valgrind
option.
2015-03-31 23:43:38 +02:00
antirez
01a41c0d9c Sentinel / Cluster test: exit with non-zero error code on failures. 2015-03-30 14:29:01 +02:00
antirez
7701a4cc7e Test: regression for issue #2473. 2015-03-27 12:10:46 +01:00
antirez
d42c13f955 Cluster: unit 10 modified to leave cluster in proper state. 2015-03-22 22:58:53 +01:00
antirez
b2820bcb61 Cluster: CLUSTER FAILOVER TAKEOVER tests. 2015-03-22 22:44:23 +01:00
antirez
c56bb0d161 Cluster: more tests for manual failover + FORCE. 2015-03-22 22:44:02 +01:00
antirez
88fb2e3ce6 Cluster: new tests1 for manual failover and scripts replication. 2015-03-22 22:25:05 +01:00
antirez
7e0ea8b30d Test: fix SPOP replication test count.
If count is 0 SADD is called without element arguments, which is
currently invalid.
2015-03-13 17:30:13 +01:00
antirez
5f6292f980 Test: HSTRLEN stress test of corner cases.
Main point here is to correctly report LLONG_MIN length, since to take
the absolute value we need care in sdigits10().
2015-02-27 15:44:44 +01:00
antirez
d4a13bd2f4 Hash: HSTRLEN (was HVSTRLEN) improved.
1. HVSTRLEN -> HSTRLEN. It's unlikely one needs the length of the key,
   not clear how the API would work (by value does not make sense) and
   there will be better names anyway.
2. Default is to return 0 when field is missing.
3. Default is to return 0 when key is missing.
4. The implementation was slower than needed, and produced unnecessary COW.

Related issue #2415.
2015-02-27 15:31:55 +01:00
Salvatore Sanfilippo
261b9d1b0f Merge pull request #2415 from landmime/unstable
added a new hvstrlen command
2015-02-27 15:24:04 +01:00
antirez
d5efd018cf Test: fixes a few tests after basic unit refactoring. 2015-02-25 10:37:52 +01:00
antirez
5b562e64a0 Test: split basic unit into string, incr, keyspace units. 2015-02-25 10:33:29 +01:00
antirez
fa8fcff3f0 Change RENAME behavior when src and dst keys are the same.
Fixes issue #2392.
2015-02-23 11:24:24 +01:00
Jason Roth
6cc1d51719 added a new hvstrlen command
the hvstrlen command returns the length of a hash field value
2015-02-21 15:01:18 +00:00
antirez
45a1c66553 SPOP replication tests. 2015-02-11 10:52:28 +01:00
antirez
b842565acb SPOP explicit tests for the three different code paths. 2015-02-11 10:52:28 +01:00
antirez
38afac7752 alsoPropagate: handle REDIS_CALL_PROPAGATE and AOF loading. 2015-02-11 10:52:28 +01:00
antirez
ce54260321 Faster memory efficiency test.
This test on Linux was extremely slow, since in Tcl we can't enable
easily tcp-nodelay, so the busy loop used to take *a lot* with bigger
writes. Fixed using pipelining.
2015-02-10 14:47:45 +01:00
antirez
41d0e80ec3 Added regression test for issue #2371. 2015-02-10 14:40:27 +01:00
antirez
d7d689e5cf Fix RDB corruption test after server behavior change. 2015-02-04 11:53:19 +01:00
antirez
a301cd0de4 Avoid duplicated instance execution code in Cluster test. 2015-01-22 18:59:39 +01:00
antirez
46670cd1ff Cluster test: when valgrind is enabled, use a larger node-timeout.
Removes some percentage of timing related failures.
2015-01-22 16:08:21 +01:00
antirez
ebe1f52ddb Cluster test initialization: use transaction for reset + set-config-epoch.
Otherwise between the two commands other nodes may contact us making the
next SET-CONFIG-EPOCH call impossible.
2015-01-21 18:48:08 +01:00
antirez
3f759958ac Cluster test: wait for port to unbound in kill_instance.
Otherwise kill_instance + restart_instance in short succession will
still find the port busy and will fail.
2015-01-21 16:47:36 +01:00
antirez
b71060f360 Cluster/Sentinel test: also pause on abort_sentinel_test call. 2015-01-21 16:18:34 +01:00
antirez
507ca219b4 Cluster/Sentinel test: pause on exceptions as well. 2015-01-21 16:13:30 +01:00
Matt Stancliff
e240d16cc9 Add --track-origins=yes to valgrind 2015-01-21 15:48:19 +01:00
Matt Stancliff
52aa050a79 Tell sentinel/cluster tests to allow valgrind 2015-01-21 15:04:12 +01:00
antirez
72640fe5fc Cluster test: also write from Lua script in resharding test. 2015-01-09 11:23:22 +01:00
Matt Stancliff
16cda6f076 Config: Add quicklist, remove old list options
This removes:
  - list-max-ziplist-entries
  - list-max-ziplist-value

This adds:
  - list-max-ziplist-size
  - list-compress-depth

Also updates config file with new sections and updates
tests to use quicklist settings instead of old list settings.
2015-01-02 11:16:10 -05:00
Matt Stancliff
6abb134d6e Increase test size for migrating large values
Previously, the old test ran 5,000 loops and used about 500k.

With quicklist, storing those same 5,000 loops takes up 24k, so the
"large value check" failed!

This increases the test to 20,000 loops which makes the object dump 96k.
2015-01-02 11:16:09 -05:00
Matt Stancliff
e24ef16446 Add quicklist implementation
This replaces individual ziplist vs. linkedlist representations
for Redis list operations.

Big thanks for all the reviews and feedback from everybody in
https://github.com/antirez/redis/pull/2143
2015-01-02 11:16:08 -05:00
Alon Diamant
582c15db57 Added <count> parameter to SPOP:
spopCommand() now runs spopWithCountCommand() in case the <count> param is found.
Added intsetRandomMembers() to Intset: Copies N random members from the set into inputted 'values' array. Uses either the Knuth or Floyd sample algos depending on ratio count/size.
Added setTypeRandomElements() to SET type: Returns a number of random elements from a non empty set. This is a version of setTypeRandomElement() that is modified in order to return multiple entries, using dictGetRandomKeys() and intsetRandomMembers().
Added tests for SPOP with <count>: unit/type/set, unit/scripting, integration/aof
--
Cleaned up code a bit to match with required Redis coding style
2014-12-14 12:25:42 +02:00
Salvatore Sanfilippo
55d0a99c09 Merge pull request #2094 from mattsta/nosort
Fix zero-ordering SORT when called against lists
2014-12-11 15:54:39 +01:00
antirez
ac6a7e5925 Regression test for issue #2175. 2014-12-03 10:38:56 +01:00
antirez
e346d72200 Test: wait for actual startup in start_server.
start_server now uses return value from Tcl exec to get the server pid,
however this introduces errors that depend from timing: a lot of the
testing code base assumed the server to be actually up and running when
server_start returns.

So the old code that waits to see the pid in the log file was restored.
2014-11-28 11:49:26 +01:00
antirez
820d9dd5cb Test: try to cleanup still running Redis instances on exit.
It's hard to run the Redis test continuously if it leaks processes on
exceptions / errors.
2014-11-28 11:38:17 +01:00
antirez
bf470753ee Test framework: exit on timeout with report.
There was no sane way to detect tests that may never end because of
Redis bugs or tests bugs.
2014-11-28 11:05:58 +01:00
antirez
013fc0ad58 Attempt to prevent false positives in replication test. 2014-11-24 11:54:56 +01:00
antirez
35591ab436 Merge remote-tracking branch 'origin/unstable' into unstable 2014-11-14 17:10:48 +01:00
Matt Stancliff
f23ce6b19a Lua: add cmsgpack scripting tests
Basically: test to make sure we can load cmsgpack
and do some sanity checks to make sure pack/unpack works
properly.  We also have a bonus test for circular encoding
and decoding because I was curious how it worked.
2014-11-14 17:08:57 +01:00