-
-
Notifications
You must be signed in to change notification settings - Fork 72
test:Dragonfly #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
test:Dragonfly #373
Changes from all commits
b334fe7
44f6771
95224f2
f8311c3
6d1ba02
1d710f5
2938362
518ea9d
c3257c8
777d1c0
8794b37
d348793
a22ab1c
92c85fe
5199bfa
22c9966
cba80b7
7733592
eb26fda
cc58ac8
c164e1f
ab5a333
5a2d160
8390b13
06a3003
860c0dc
3af20af
72d0d53
2f859f2
c379c1e
032b218
de418c2
25b64d1
7f230bb
b0dea4c
879d2c4
c0f6a8d
80816f1
6c3dbc8
6229a78
b6530c0
7769bc1
aec8640
06564cf
8934e2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -231,10 +231,12 @@ def _bitfield_set( | |
| return new_value if value is None else ans | ||
|
|
||
| @command(fixed=(Key(bytes),), repeat=(bytes,)) | ||
| def bitfield(self, key: CommandItem, *args: bytes) -> List[Optional[int]]: | ||
| def bitfield(self, key: CommandItem, *args: bytes) -> Optional[List[Optional[int]]]: | ||
| overflow = b"WRAP" | ||
| results: List[Optional[int]] = [] | ||
| i = 0 | ||
| if len(args) == 0 and self._server.server_type == "dragonfly": | ||
| raise SimpleError(msgs.WRONG_ARGS_MSG6.format("bitfield")) | ||
|
Comment on lines
+238
to
+239
|
||
| while i < len(args): | ||
| if casematch(args[i], b"overflow") and i + 1 < len(args): | ||
| overflow = args[i + 1].upper() | ||
|
|
@@ -269,4 +271,6 @@ def bitfield(self, key: CommandItem, *args: bytes) -> List[Optional[int]]: | |
| else: | ||
| raise SimpleError(msgs.SYNTAX_ERROR_MSG) | ||
|
|
||
| if len(results) == 0 and self._server.server_type == "dragonfly": | ||
| return None | ||
| return results | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,11 @@ | ||
| from .base import BaseTest, commands, st, common_commands, keys, values | ||
| from .base import ( | ||
| BaseTest, | ||
| commands, | ||
| values, | ||
| st, | ||
| keys, | ||
| common_commands, | ||
| ) | ||
| from .test_string import string_commands | ||
|
|
||
|
|
||
|
|
@@ -7,11 +14,11 @@ class TestServer(BaseTest): | |
| # Find a better way to test this. commands(st.just('bgsave')) | ||
| server_commands = ( | ||
| commands(st.just("dbsize")) | ||
| | commands(st.sampled_from(["flushdb", "flushall"])) | ||
| # TODO: result is non-deterministic | ||
| # | commands(st.just('lastsave')) | ||
| | commands(st.just("save")) | ||
| ) | ||
| command_strategy_redis_only = commands(st.sampled_from(["flushdb", "flushall"]), st.sampled_from([[], "async"])) | ||
| command_strategy_dragonfly = commands(st.sampled_from(["flushdb", "flushall"])) | ||
|
||
| command_strategy_redis7 = commands(st.sampled_from(["flushdb", "flushall"]), st.sampled_from([[], "async"])) | ||
| create_command_strategy = commands(st.just("set"), keys, values) | ||
| command_strategy = server_commands | string_commands | common_commands | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting out the pull_request trigger for the main test workflow effectively disables it for pull requests. This means that the main unit tests (which cover redis and valkey) will no longer run on pull requests, only on pushes to master. This is likely unintentional and will reduce test coverage for PRs. If this was intentional to focus on dragonfly testing during this development phase, it should be temporary and clearly documented.