Extend client tracking tests#7998
Extend client tracking tests#7998oranagra merged 10 commits intoredis:unstablefrom nitaicaro:unstable
Conversation
itamarhaber
left a comment
There was a problem hiding this comment.
Wow, thanks for this. My TCL isn't what it used to be, so this LGTM :)
oranagra
left a comment
There was a problem hiding this comment.
WOW. thank you @nitaicaro.
i skimmed over the changes and added a few random comments.
maybe later, someone need to have another careful review at the tests to check they're not missing anything.
i.e. i understand the C code is now 100% covered, that's great, but maybe some validations in the tests side can be improved to verify correct behavior (i.e like the issue #7871 fixed).
Added test support for the new map, null and push message types. map objects are parsed as a list of lists of key value pairs.
for instance: user => john password => 123
will be parsed to the following TCL list:
{{user john} {password 123}}
Added the following tests:
* Redirection still works with RESP3
* Able to use a RESP3 client as a redirection client
* No duplicate invalidation messages when turning BCAST mode on after normal tracking
* Server is able to evacuate enough keys when num of keys surpasses limit by more than defined initial effort
* Different clients using different protocols can track the same key
* OPTOUT tests
* OPTIN tests
* Clients can redirect to the same connection
* tracking-redir-broken test
* HELLO 3 checks
* Invalidation messages still work when using RESP3, with and without redirection
* Switching to RESP3 doesn't disturb previous tracked keys
* Tracking info is correct
These tests achieve 100% line coverage for tracking.c using lcov.
|
@nitaicaro you did a force push containing a rebase, and some changes of your own? i skimmed over the changes, i see you reduced the use of please temporarily modify p.s. it seems you have a conflict, i thought the rebase was in order to solve it. not sure what went wrong. |
|
Sorry about that @oranagra and noted. I also changed the way the new NULL type is parsed. You can see the difference in redis.tcl. I also fixed a test that was acting a bit funny ( |
|
@nitaicaro and if you intend to test it on your own repo (pushing to another branch rather than the one used for this PR. i.e. if you're gonna run a lot of tests and don't wanna bother us seeing them), you'll need to remove this: the reason i'm worried is that with deferred clients, you can't assume that by the time tcl reached the next line, redis actually processed the command you sent to it. or better yet, some |
|
+1 about the thankyou for adding tests. It's boring work people usually don't like doing 👍 The one function I see that is "covered" but not validated is flushall/flushdb send invalidation messages. |
|
it looks like there are no test timing issues that jump out. maybe we'll just have to deal with them when they come. @nitaicaro can you please validate the correct behavior of flushdb that @madolson pointed out. |
|
@nitaicaro and @eliblight work together btw. He's already reviewed it. |
|
indeed i have
…On Wed, 4 Nov 2020, 23:03 Madelyn Olson, ***@***.***> wrote:
@nitaicaro <https://github.com/nitaicaro> and @eliblight
<https://github.com/eliblight> work together btw. He's already reviewed
it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7998 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYF35VXAJROCVY6ETBCBBDSOG6RPANCNFSM4TET5HNQ>
.
|
Added test support for the new map, null and push message types. map objects are parsed as a list of lists of key value pairs. for instance: user => john password => 123
will be parsed to the following TCL list:
{{user john} {password 123}}
Added the following tests:
- Redirection still works with RESP3
- Able to use a RESP3 client as a redirection client
- No duplicate invalidation messages when turning BCAST mode on after normal tracking
- Server is able to evacuate enough keys when num of keys surpasses limit by more than defined initial effort
- Different clients using different protocols can track the same key
- OPTOUT tests
- OPTIN tests
- Clients can redirect to the same connection
- tracking-redir-broken test
- HELLO 3 checks
- Invalidation messages still work when using RESP3, with and without redirection
- Switching to RESP3 doesn't disturb previous tracked keys
- Tracking info is correct
- Flushall and flushdb produce invalidation messages
These tests achieve 100% line coverage for tracking.c using lcov.
|
Implemented your suggestions @oranagra. |
|
@nitaicaro tests are passing (at least 2 more times), i guess we're good to merge this. |
|
@oranagra done |
|
I did glance through the difference from the last review, and didn't see anything wrong. |
Test support for the new map, null and push message types. Map objects are parsed as a list of lists of key value pairs.
for instance: user => john password => 123
will be parsed to the following TCL list:
{{user john} {password 123}}
Also added the following tests:
Redirection still works with RESP3
Able to use a RESP3 client as a redirection client
No duplicate invalidation messages when turning BCAST mode on after normal tracking
Server is able to evacuate enough keys when num of keys surpasses limit by more than defined initial effort
Different clients using different protocols can track the same key
OPTOUT tests
OPTIN tests
Clients can redirect to the same connection
tracking-redir-broken test
HELLO 3 checks
Invalidation messages still work when using RESP3, with and without redirection
Switching to RESP3 doesn't disturb previous tracked keys
Tracking info is correct
Flushall and flushdb produce invalidation messages
These tests achieve 100% line coverage for tracking.c using lcov.
Test support for the new map, null and push message types. Map objects are parsed as a list of lists of key value pairs.
for instance: user => john password => 123
will be parsed to the following TCL list:
{{user john} {password 123}}
Also added the following tests:
Redirection still works with RESP3
Able to use a RESP3 client as a redirection client
No duplicate invalidation messages when turning BCAST mode on after normal tracking
Server is able to evacuate enough keys when num of keys surpasses limit by more than defined initial effort
Different clients using different protocols can track the same key
OPTOUT tests
OPTIN tests
Clients can redirect to the same connection
tracking-redir-broken test
HELLO 3 checks
Invalidation messages still work when using RESP3, with and without redirection
Switching to RESP3 doesn't disturb previous tracked keys
Tracking info is correct
Flushall and flushdb produce invalidation messages
These tests achieve 100% line coverage for tracking.c using lcov.