38 Commits

Author SHA1 Message Date
Oran Agra
e783c03dd1 test infra - write test name to logfile 2020-09-06 09:59:19 +03:00
Oran Agra
3351549c22 runtest --stop pause stops before terminating the redis server (#7513)
in the majority of the cases (on this rarely used feature) we want to
stop and be able to connect to the shard with redis-cli.
since these are two different processes interracting with the tty we
need to stop both, and we'll have to hit enter twice, but it's not that
bad considering it is rarely used.
2020-07-13 16:09:08 +03:00
Oran Agra
5752b1718b test infra: improve prints on failed assertions
sometimes we have several assertions with the same condition in the same test
at different stages, and when these fail (the ones that print the condition
text) you don't know which one it was. other assertions didn't print the
condition text (variable names), just the expected and unexpected values.

So now, all assertions print context line, and conditin text.

besides, one of the major differences between 'assert' and 'assert_equal',
is that the later is able to print the value that doesn't match the expected.
if there is a rare non-reproducible failure, it is helpful to know what was
the value the test encountered and how far it was from the threshold.

So now, adding assert_lessthan and assert_range that can be used in some places.
were we used just 'assert { a > b }' so far.
2019-10-29 17:38:12 +02:00
Madelyn Olson
364c8601e3 Allowed passing in of password hash and fixed config rewrite 2019-09-30 17:57:49 +02:00
Oran Agra
dfdeb6a036 test suite conveniency improvements
* allowing --single to be repeated
* adding --only so that only a specific test inside a unit can be run
* adding --skiptill useful to resume a test that crashed passed the problematic unit.
  useful together with --clients 1
* adding --skipfile to use a file containing list of tests names to skip
* printing the names of the tests that are skiped by skipfile or denytags
* adding --config to add config file options from command line
2018-07-30 19:13:15 +03:00
Oran Agra
7496636280 various cleanups and minor fixes 2016-04-25 16:49:57 +03: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
Matt Stancliff
a5042b6c9d Fix spelling in some test cases 2014-09-29 06:49:08 -04:00
antirez
6f02cfaeac Sentinel test: framework improved and conf-update unit added.
It is now possible to kill and restart sentinel or redis instances for
more real-world testing.

The 01 unit tests the capability of Sentinel to update the configuration
of Sentinels rejoining the cluster, however the test is pretty trivial
and more tests should be added.
2014-02-22 17:27:49 +01:00
antirez
e3c7c1ebd5 Test: colorstr moved to util.tcl. 2014-02-17 17:36:50 +01:00
antirez
53e898d3f1 Redis test: More reliable BRPOPLPUSH replication test.
Now it uses the new wait_for_condition testing primitive.
Also wait_for_condition implementation was fixed in this commit to properly
escape the expr command and its argument.
2012-04-26 11:25:13 +02:00
antirez
d3d7542a86 Redis test: scripting EVALSHA replication test more reliable.
A new primitive wait_for_condition was introduced in the scripting
engine that makes waiting for events simpler, so that it is simpler to
write tests that are more resistant to timing issues.
2012-04-26 11:16:52 +02:00
antirez
4f69e70bcd Regression test for the main problem causing issue #141. Minor changes/fixes/additions to the test suite itself needed to write the test. 2012-01-06 17:28:40 +01:00
antirez
9b63d1d81e Redis test: when assertion fails print not just the expression but also expanded values in the error message. 2011-12-21 09:23:22 +01:00
antirez
6a5ba0be41 fixed assert proc on Redis test 2011-07-28 12:31:44 +02:00
antirez
5acc46d6b3 better recap of failed tests. 2011-07-11 12:56:00 +02:00
antirez
87a724e547 display less useless information in parallel test 2011-07-11 00:14:12 +02:00
antirez
1bb0f27110 some test colorization and some fix 2011-07-11 00:09:56 +02:00
antirez
4e7aaf0a99 Initial implementation of a client-server parallel testing system for Redis in order to speedup execution of the test suite. 2011-07-10 23:25:48 +02:00
antirez
21efce77ff fixed color support for test suite. Now colors are shown as long as there is xterm somewhere inside the TERM env var 2011-02-22 16:41:27 +01:00
antirez
f86fdecd1d fixed test rendering when test failed in non verbose mode 2010-12-15 11:04:04 +01:00
antirez
f2682b6581 print test names inline in the non verbose output mode 2010-12-15 10:44:36 +01:00
antirez
ebfb89ec7a colorized make test output when the verbose output is disabled (default) 2010-12-15 10:14:34 +01:00
Pieter Noordhuis
0dc602e3b5 Be less verbose in testing; improve error handling 2010-12-10 16:13:21 +01:00
Pieter Noordhuis
4865ad620b Show output of leaks command on a leak 2010-10-15 15:56:16 +02:00
Pieter Noordhuis
6825491928 Fix assertion function on value encoding 2010-08-01 11:20:26 +02:00
Pieter Noordhuis
86d392498b ensure the value is swapped in before testing its encoding 2010-07-29 13:31:24 +02:00
Pieter Noordhuis
c2ff0e90b8 more pub/sub tests 2010-06-16 11:03:23 +02:00
Pieter Noordhuis
5eedc9c65e tests for BLPOP/BRPOP via an option in the tcl client that defers reading the reply 2010-06-15 21:23:18 +02:00
Pieter Noordhuis
08b5920750 change ltrim tests to cover all min/max cases and add stronger stresser 2010-06-14 09:45:34 +02:00
Pieter Noordhuis
d4507ec615 refactor list tests to test both encodings; implemented assert functions 2010-06-04 16:31:27 +02:00
Pieter Noordhuis
73bd6c583b pass tags to filter and match via arguments 2010-06-02 23:22:20 +02:00
Pieter Noordhuis
6e0e5bedd9 basic support to tag tests 2010-06-02 22:53:22 +02:00
Pieter Noordhuis
38273a9ed6 removed obsolete code 2010-06-02 21:53:15 +02:00
Pieter Noordhuis
436f18b618 catch exceptions in the server proc, to be able to kill the entire chain of running servers 2010-06-02 21:53:10 +02:00
antirez
9b30e1a207 WATCH is now able to detect keys removed by FLUSHALL and FLUSHDB 2010-05-25 19:30:24 +02:00
Pieter Noordhuis
fdfb02e7ff print warnings in redis log when a test raises an exception (very likely to be caused by something like a failed assertion) 2010-05-15 23:48:08 +02:00
antirez
ab72b4833d minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00