Commit Graph

1016 Commits

Author SHA1 Message Date
575e247a0e Geo: fix tests after distance precision change 2015-06-22 15:00:37 +02:00
73134f6a0b 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
7f4ac3d19c [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
39b49bcaaf Test: ZADD CH tests 2015-05-29 11:34:43 +02:00
23ba5c1092 Test: ZADD INCR test 2015-05-29 11:28:52 +02:00
910e72d1c1 Test: ZADD NX and XX options tests 2015-05-29 11:23:49 +02:00
164b6bbab5 Merge branch 'sentinel-32' into unstable 2015-05-19 12:26:57 +02:00
d614f1c37e Sentinel: CKQUORUM tests 2015-05-19 12:26:09 +02:00
626b4f6907 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
386804246f 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
65090401b7 Sentinel / Cluster test: exit with non-zero error code on failures. 2015-03-30 14:29:01 +02:00
37260bc3be Test: regression for issue #2473. 2015-03-27 12:10:46 +01:00
9b0bcf25e1 Cluster: unit 10 modified to leave cluster in proper state. 2015-03-22 22:58:53 +01:00
f300680408 Cluster: CLUSTER FAILOVER TAKEOVER tests. 2015-03-22 22:44:23 +01:00
631538cfe0 Cluster: more tests for manual failover + FORCE. 2015-03-22 22:44:02 +01:00
3b4de6aa18 Cluster: new tests1 for manual failover and scripts replication. 2015-03-22 22:25:05 +01:00
e791e2dda1 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
084a59c324 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
4e54b85a19 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
b49c00a79c Merge pull request #2415 from landmime/unstable
added a new hvstrlen command
2015-02-27 15:24:04 +01:00
74354ceef5 Test: fixes a few tests after basic unit refactoring. 2015-02-25 10:37:52 +01:00
954151f62b Test: split basic unit into string, incr, keyspace units. 2015-02-25 10:33:29 +01:00
fc365a3a00 Change RENAME behavior when src and dst keys are the same.
Fixes issue #2392.
2015-02-23 11:24:24 +01:00
db9461e466 added a new hvstrlen command
the hvstrlen command returns the length of a hash field value
2015-02-21 15:01:18 +00:00
a1d9ec0d44 SPOP replication tests. 2015-02-11 10:52:28 +01:00
dffbbb5a78 SPOP explicit tests for the three different code paths. 2015-02-11 10:52:28 +01:00
55003f7a11 alsoPropagate: handle REDIS_CALL_PROPAGATE and AOF loading. 2015-02-11 10:52:28 +01:00
5e3dcc522b 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
e1fce55237 Added regression test for issue #2371. 2015-02-10 14:40:27 +01:00
2ac7b5a8b4 Fix RDB corruption test after server behavior change. 2015-02-04 11:53:19 +01:00
e22d75734e Avoid duplicated instance execution code in Cluster test. 2015-01-22 18:59:39 +01:00
d5ba544e67 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
7e79b3f51a 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
acb1d8debf 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
b3bf7584b0 Cluster/Sentinel test: also pause on abort_sentinel_test call. 2015-01-21 16:18:34 +01:00
a5bb0a0774 Cluster/Sentinel test: pause on exceptions as well. 2015-01-21 16:13:30 +01:00
491d57abaa Add --track-origins=yes to valgrind 2015-01-21 15:48:19 +01:00
b0146aafeb Tell sentinel/cluster tests to allow valgrind 2015-01-21 15:04:12 +01:00
f3fd58eb4a Cluster test: also write from Lua script in resharding test. 2015-01-09 11:23:22 +01:00
02bb515a09 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
e0d94a7b01 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
5e362b84ab 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
288028876f 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
c50693d40f Merge pull request #2094 from mattsta/nosort
Fix zero-ordering SORT when called against lists
2014-12-11 15:54:39 +01:00
b8a48ad5fe Regression test for issue #2175. 2014-12-03 10:38:56 +01:00
fe0d371995 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
bd3a51615c 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
8acb3a8843 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
8a09e12906 Attempt to prevent false positives in replication test. 2014-11-24 11:54:56 +01:00
8a75ec0fca Merge remote-tracking branch 'origin/unstable' into unstable 2014-11-14 17:10:48 +01:00