Improve test suite to handle external servers better.#9033
Conversation
Before this commit, this would result with a confusing error message about "too many bind addresses". After this fix it is possible to set an empty bind address which is a valid configuration (any address).
oranagra
left a comment
There was a problem hiding this comment.
i think we need to add a CI job that spins up a server (possibly one in cluster mode) and runs the test suite against it.
this way is a test is added that's incompatible with the external mode, we'll detect it before merging.
if we do that, we'll also feel safer to make the skip-external an opt-out feature rather than the opt-in one (external-ok)
| # two seconds. | ||
| after 2000 |
There was a problem hiding this comment.
- i think we should use a wait-for-condition here with a timeout rather than an sleep. (that's actually true for all sleeps).
- any test that's time-dependent (has a long sleep, or a wait_for that waits for something in redis that takes a long time), should have a
slowtag, so that we can run the test suite skipping inherently slow tests - i'd like the slow skip tag to somehow be used by default? (i want it to be an opt-in, like
--accuraterather than opt-out), or at the very least, i want to skip these in the CI.yml runs, since we keep adding more and more of these.
|
@yossigo I'm not sure if I'm reading this wrong, I seem to remember reading somewhere that we can ignore certain tags when running |
|
@sundb there's the |
|
@oranagra I see that. |
This reverts commit dd74c23.
oranagra
left a comment
There was a problem hiding this comment.
last round of comments.
p.s. i see that a few of my old ones are still unresolved.
* Skip slow tests on CI * Move external tests (CI and daily) to a separate file.
|
@yossigo I have a problem with my branch merge this pr, when a file has only one test it reports an error. error When I change it to the following, no error occurs. |
|
@sundb it seems to work for me. even checked out your branch and executed the test with and without |
|
@oranagra It's ok without change string.tcl to follow and run |
|
@oranagra My branch is working fine because I moved |
|
@oranagra It only goes wrong with |
This commit revives the improves the ability to run the test suite against external servers, instead of launching and managing `redis-server` processes as part of the test fixture. This capability existed in the past, using the `--host` and `--port` options. However, it was quite limited and mostly useful when running a specific tests. Attempting to run larger chunks of the test suite experienced many issues: * Many tests depend on being able to start and control `redis-server` themselves, and there's no clear distinction between external server compatible and other tests. * Cluster mode is not supported (resulting with `CROSSSLOT` errors). This PR cleans up many things and makes it possible to run the entire test suite against an external server. It also provides more fine grained controls to handle cases where the external server supports a subset of the Redis commands, limited number of databases, cluster mode, etc. The tests directory now contains a `README.md` file that describes how this works. This commit also includes additional cleanups and fixes: * Tests can now be tagged. * Tag-based selection is now unified across `start_server`, `tags` and `test`. * More information is provided about skipped or ignored tests. * Repeated patterns in tests have been extracted to common procedures, both at a global level and on a per-test file basis. * Cleaned up some cases where test setup was based on a previous test executing (a major anti-pattern that repeats itself in many places). * Cleaned up some cases where test teardown was not part of a test (in the future we should have dedicated teardown code that executes even when tests fail). * Fixed some tests that were flaky running on external servers.
This commit revives the improves the ability to run the test suite against
external servers, instead of launching and managing
redis-serverprocesses aspart of the test fixture.
This capability existed in the past, using the
--hostand--portoptions.However, it was quite limited and mostly useful when running a specific tests.
Attempting to run larger chunks of the test suite experienced many issues:
redis-serverthemselves,and there's no clear distinction between external server compatible and other
tests.
CROSSSLOTerrors).This PR cleans up many things and makes it possible to run the entire test suite
against an external server. It also provides more fine grained controls to
handle cases where the external server supports a subset of the Redis commands,
limited number of databases, cluster mode, etc.
The tests directory now contains a
README.mdfile that describes how thisworks.
This commit also includes additional cleanups and fixes:
start_server,tagsandtest.global level and on a per-test file basis.
(a major anti-pattern that repeats itself in many places).
future we should have dedicated teardown code that executes even when tests
fail).