summaryrefslogtreecommitdiff
path: root/tests/test_asyncio/test_commands.py
Commit message (Collapse)AuthorAgeFilesLines
* add async tests: test_client_info, test_client_list_types_not_replica, ↵AsyncCommandsTestsshacharPash2023-03-231-0/+21
| | | | test_client_list_replica
* async test_acl_helpshacharPash2023-03-231-0/+6
|
* async test_acl_dryrunshacharPash2023-03-221-54/+66
|
* adding async tests - start with test_authshacharPash2023-03-211-0/+51
|
* Combine auto-concatenated strings (#2482)David Gilman2022-12-141-1/+1
|
* Fix special response parsing options handling (#2302)Shay Fadida2022-11-091-1/+11
| | | | | | | | | | | | | | | | | * Fix special response parsing options handling When using special response parsing options like `NEVER_DECODE` and `EMPTY_RESPONSE`, don't pass them to the response callbacks because some of them are not prepared for receiving named arguments. Instead, redis-py should use them before calling the callbacks and then discard them. * Use kwargs instead of options * change options to kwargs in asyncio/cluster.py/L878 Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* fixing async test for module list (#2367)Chayim2022-09-071-1/+2
|
* Add BITFIELD_RO (#2340)Alibi2022-08-211-0/+13
|
* Fix timezone handling for datetime to unixtime conversions (#2213)joe2022-08-021-4/+3
| | | | | | | | | | | | | | * Fix timezone handling for datetime to unixtime conversions datetime objects are supported to set expire, these can have timezones. mktime was used to convert these to unixtime. mktime in Python however is not timezone aware, it expects the input to be UTC and redis-py did not convert the datetime timestamps to UTC before calling mktime. This can lead to: 1) Setting incorrect expire times because the input datetime object has a timezone but is passed to mktime without converting to UTC first. 2) When the datetime timestamp is within DST, mktime fails with "OverflowError: mktime argument out of range" because UTC doesn't have DST. This depends on libc versions. * linters Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Drop python 3.6 support (#2306)dvora-h2022-07-271-8/+1
|
* Fix warnings and resource usage problems in asyncio unittests (#2258)Kristján Valur Jónsson2022-07-261-79/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use pytest-asyncio in auto mode Remove overly genereric `pytestmark=pytest.mark.asyncio` causing lots of warning noise * Use "Factories as Fixtures" test pattern for the `create_redis` fixture this fixture is now async, avoiding teardown problems with missing event loops. * Fix sporadic error on fast event loops, such as `--uvloop` * Close connection, even if "username" was in kwargs This fixes a resource usage warning in the async unittests. * Do async cleanup of acl passwords via a fixture * Remove unused import, fix whitespace * Fix test with missing "await" * Close pubsub objects after use in unittest Use a simple fixture where possible, otherwise manually call pubsub.close() * re-introduce `pytestmark=pytest.mark.asyncio` for python 3.6 * Use context manager to clean up connections in connection pool for unit tests * Provide asynccontextmanager for python 3.6 * make `test_late_subscribe()` more robuste * Catch a couple of additional leaked resources
* Fix tests for Redis 7 (#2182)dvora-h2022-05-311-16/+20
| | | | | * fix tests * async
* update black to 22.3.0 (#2171)Utkarsh Gupta2022-05-301-11/+8
|
* Add Async RedisCluster (#2099)Utkarsh Gupta2022-05-081-36/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy Cluster Client, Commands, Commands Parser, Tests for asyncio * Async Cluster Tests: Async/Await * Add Async RedisCluster * cluster: use ERRORS_ALLOW_RETRY from self.__class__ * async_cluster: rework redis_connection, initialize, & close - move redis_connection from NodesManager to ClusterNode & handle all related logic in ClusterNode class - use Locks while initializing or closing - in case of error, close connections instead of instantly reinitializing - create ResourceWarning instead of manually deleting client object - use asyncio.gather to run commands/initialize/close in parallel - inline single use functions - fix test_acl_log for py3.6 * async_cluster: add types * async_cluster: add docs * docs: update sphinx & add sphinx_autodoc_typehints * async_cluster: move TargetNodesT to cluster module * async_cluster/commands: inherit commands from sync class if possible * async_cluster: add benchmark script with aredis & aioredis-cluster * async_cluster: remove logging * async_cluster: inline functions * async_cluster: manage Connection instead of Redis Client * async_cluster/commands: optimize parser * async_cluster: use ensure_future & generators for gather * async_conn: optimize * async_cluster: optimize determine_slot * async_cluster: optimize determine_nodes * async_cluster/parser: optimize _get_moveable_keys * async_cluster: inlined check_slots_coverage * async_cluster: update docstrings * async_cluster: add concurrent test & use read_response/_update_moved_slots without lock Co-authored-by: Chayim <chayim@users.noreply.github.com>
* ACL SETUSER - add selectors and key based permissions (#2161)dvora-h2022-05-031-0/+2
| | | | | | | * acl setuser * async tests Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Async tests for redis commands, json, bloom, timeseries (#2087)dvora-h2022-04-071-0/+3049
| | | | | | | | | | | | | | | | | | | | | | | | | * test async commands * test async json commands * test async timeseries commands * test async bloom commands * linters * linters * skip on cluster * linters * linters * isort * flynt * remove print
* Add Async Support (#1899)Andrew Chen Wang2022-02-221-0/+3
Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com>